codeigniter
codeigniter CSRF error: “The action you have requested is not allowed.”
The problem solved by this Solution: set $config[‘cookie_secure’] in config file to FALSE if you’re using HTTP.
UNION query with codeigniter’s active record pattern
CodeIgniter’s ActiveRecord doesn’t support UNION, so you would just write your query and use the ActiveRecord’s query method. $this->db->query(‘SELECT column_name(s) FROM table_name1 UNION SELECT column_name(s) FROM table_name2’);
$this->session->set_flashdata() and then $this->session->flashdata() doesn’t work in codeigniter
Well, the documentation does actually state that CodeIgniter supports “flashdata”, or session data that will only be available for the next server request, and are then automatically cleared. as the very first thing, which obviusly means that you need to do a new server request. A redirect, a refresh, a link or some other mean … Read more
CodeIgniter: INSERT multiple records without cycle
Codeigniter active record has a function insert_batch i think that is what you need $data = array( array( ‘title’ => ‘My title’ , ‘name’ => ‘My Name’ , ‘date’ => ‘My date’ ), array( ‘title’ => ‘Another title’ , ‘name’ => ‘Another Name’ , ‘date’ => ‘Another date’ ) ); $this->db->insert_batch(‘mytable’, $data); // Produces: INSERT … Read more