Quantcast
Channel: CodeIgniter Forums - All Forums
Browsing all 14348 articles
Browse latest View live

Translateable URL

Hi guys! What is the best way to build translateable URL?  I could use this way (by routing): Code: //english $route['en/article/(:any)'] = 'artice/view/$1'; //romanian $route['ro/articol/(:any)'] =...

View Article


Adding alpha_spaces_dashes as a native validation rule

Any thoughts on adding alpha_spaces_dashes as a native validation rule?  Validating a persons last name is very common. Last names can include dashes and spaces but not numbers. However, this common...

View Article


get_instance function

Hello, I'm currently exploring the new CodeIgniter 4, like the whole new idea so i'm preppin my code into the new version 4. Saw the form_helper is not implemented at this moment, so i've used to one...

View Article

From Validation Bug or Syntax

I'm trying to call a custom validation method (), which reside in a custom library (). But I'm getting a CI error in libraries/Form_validation.php. Not sure if this is a bug of a problem with my...

View Article

Image may be NSFW.
Clik here to view.

Add named values for query binding

I truly hope I am not saying something wrong if I say that today, the latest version of CI I'm using 3.1.0 does not support named values for query binding. Whenever I implement insert queries or update...

View Article


Insert_Batch with update for duplicate key

Hi, I am looking for a function where I can do following. Insert the records in batch into table when input is provided as array of data to update records along with table name, but when key is not...

View Article

Quiz Questions output

Dear All, I have a code which is displaying questions in a quiz randomly. I would like the questions to be displayed as entered in the database. What do I need to change?

View Article

Create database if not exists?

Is there a way to do "create database if not exists"? DBFORGE only allows the `create_database` method, which does "create database", and if exists throws you off by displaying an error, not even an...

View Article


An uncaught Exception was encountered

in CodeIgniter view i have this,  <!DOCTYPE html> <html> <head><title></title> </head> <body> <?php  echo "<table> <tr>...

View Article


How to create foreign keys

Hi, I am writing a migration tool for my database, and there are some foreign keys in it. How can I create/remove foreign keys when necessary? It doesn't seem like DBFORGE is able to do that..

View Article

DRY approach with different request type

Hi! I've multiple controller classes, each containing a lot of controllers. Class1/ControllerA Class1/ControllerB Class1/ControllerC Class2/ControllerD Class2/ControllerE Class2/ControllerF ... Each...

View Article

csrf regenerate set to false?

Hello, If I have this csrf_regenerate set to TRUE. And submit form and has error then reload form. I get error  Code: The action you have requested is not allowed. How ever if i have this...

View Article

The session to files do not appear in sessions folder

Hello, The session to files do not appear in ../sessions folder. /sessions folder with cmod 0777 Any suggestion? Using database that works. $config['sess_driver'] = 'files'; //$config['sess_driver'] =...

View Article


Image may be NSFW.
Clik here to view.

Can't configure 'remove index.php'

Hi, I just can't succeed in removing index.php  . I googled, found many references to this, unsuccessful. I also search the forum, loads of posts, again without success. The codeigniter directory is...

View Article

DBForge to support foreign keys

Currently, I am writing a migration to a database that has foreign keys. I am using DBForge for all of my creation, deletion, and editing. I managed to do everything but create/delete foreign keys. I...

View Article


Does it matter share host or cloud host?

Hi, I want to purchase a host for my web application which is written in codeigniter. I don't know should i purchase Share HOST or Cloud HOST. So far i was using Share Host and i don't have experience...

View Article

DBForge create_database if not exists

Like `create_table`, the `create_database` method should have `$exists = false` Such that: `create_database("name", true)` will render a "CREATE DATABASE `name` IF NOT EXISTS" and in case it returns an...

View Article


DBForge should move to using ErrorException

Currently, when DBForge encounters an error, for example: "CREATE DATABASE default" it shows an error. I think it only makes sense it to just through an ErrorException, so it is catchable.

View Article

Make definitions safer

In the index, there is `define("ENVIRONMENT", ....)` However, for my case, and I guess a general case, the first line of the index loads a config file. For me, that config file the ENVIRONMENT...

View Article

Validation errors

Why doesn't this throw any error, and always silently fails? Why is the third parameter optional? PHP Code: $this->form_validation->set_rules('field_name',...

View Article
Browsing all 14348 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>