codeigniter

Codeigniter, $_SESSION arrays

Hi , i'm trying to use native $_SESSION arrays in Codeigniter beacause i can't use $_COOKIES arrays, so i made my own class but seems that Codeigniter continue to save data on cokkies cause if i disable browser cookies i can't retrieve $_SESSION data :O !! incredible....i can't understand why? is codeigniter stopping or removing all $_SE...

Code Igniter - Anchor Reutrn False?

Hello, I'm trying to return false with using the anchor function in CI, as it's sending me to another page, rather than loading ajax. Here's my code: <li id="addclient"><?php echo anchor('site_add_client', 'Clients', array('onclick'=> "content_ajax_client()")); ?> </li> Thanks ...

Codeigniter: How to include javascript files

Hello I just started working with CodeIgniter framework. My current directory structure is Demo(Project name) +System +Spplication -Controllers -demo.php +Model +Views -view_demo.php +Js -ajax.js -jquery.js Please tell me how to include .js files in view_demo.php. Thanks Raj ...

Using the PHP spl_autoload_register() with Codeigniter

Hello, Please how can I use spl_autoload_register() with Codeigniter? I need to do this because Im using Codeigniter with another framework which also uses autoload. I saw something here http://stackoverflow.com/questions/3710480/php-spl-autoload-register but I dont know how to target the CodeIgniter autoload. Im new to OOP and Code...

fckeditor characters encoding issue

am using fckeditor inside codeigniter framework when i retrive data from data base it show an unreconized characters instead of special characters (french charachters like é è ç ..) ? in data base data is converted to html entities, and i can show it without problem on the front pages, but in the backend i have a probleme with the editor...

ESAPI4PHP vs Codeigniter Built-in Security

Hi All, I have one project that is using ESAPI4PHP which is a port of OWASP's ESAPI. I am starting another project using Code Igniter and I notice that they have built-in security controls (form validation, etc...). Has anybody used both? If so, which would you choose again? ...

how to get data from three tables by a join statement in mysql

Hi Guys, In my application i have three tables, reservation, patient and sub_unit, i need to take the patient_id from reservation table and query the patient table for patient data,same time i need to take the sub_unit_id from the reservation table and query the sub_unit name from the sub_unit table... i need to put all this data in to ...

Codeigniter, domain to a certain area of the site

Hi, I'm not a very experienced programmer, and am using CodeIgniter for second time. Suppose I have www.domain1.com. So I will have, say 3 controllers /area1, /area2, /area3. Users can access them as www.domain1.com/area1 etc. if I set the base URL as www.domain1.com. But my problem is, the client wants a certain area of the web, say ar...

Can't Load Models in CodeIgniter with Doctrine

Hi all, I have been trying out CodeIgniter. So far, I like it. I decided to also try out Doctrine because I hear so much about ORM and that Doctrine is great. I found some tutorials: phpandstuff blog medryx blog Doctrine Cookbook CodeIgniter wiki I have tried all of the methods that I found at those to try to set up a working D...

Not displaying the controller in the URL

How can you hide the controller in the URL? When a non-registered user comes to my website, I would like them to see: http://www.site.com/ Once they log-in, then they would be directed to the "Home" controller, then appearing as normal (i.e. http://www.site.com/home) Any suggestions? ...

CodeIgniter Email Class - User-Agent Header

I'm trying to change the User-Agent and X-Mailer headers sent out by CodeIgniter's email class, so that there's no way that anyone can find out that the website is running on the CI framework. As per the manual, I've made an application/config/email.php file containing the following: <?php if ( ! defined('BASEPATH')) exit('No direct sc...

Codeigniter Insert Multiple Rows in SQL

Hi, I am fresh to Codeigniter. I have a form which looks something like this. <tr> <td><input type="text" name="Name[0]" value=""></td> <td><input type="text" name="Address[0]" value=""><br></td> <td><input type="text" name="Age[0]" value=""></td> <td><input type="text" name="Email[0]" value=""></td> </tr> <tr> <td><input type="t...

codeigniter modular extensions

I'm trying to implement modular extensions into a codeigniter 2 setup but am having a few problems. I followed the installation instructions on the wiki and everything was working fine. Then I started to play around a bit and try and use it. All I did was create a new module called users with the required folders and added a model class ...

charting libraries for Codeigniter 1.7.2

Hi Guys, I need a good charting library for my project which is done using Codeiginter. i have searched for libraries found a one called pinaci, but it states that it is for 1.4 and 1.5, can we use it with 1.7.2? can you guys suggest me a good one i can use, which you have used and have past experience? regards, Rangana ...

Codeigniter 1.7.2: function image() seems to no longer exist, what is the replacement?

A society I belong to have a website which someone who left a few years ago set up. It was done using codeigniter (which was probably rather excessive given that the website is pretty simple.) The server it is hosted on updated Php recently, which resulted in the website completely breaking. It now simply returns a page full of deprecat...

Codeigniter inserting value into array

I asked a question on SO a few hours back. How to insert an Array of field names from a form into SQL database in Codeigniter. <tr> <td><input type="text" name="user[0][name]" value=""></td> <td><input type="text" name="user[0][address]" value=""><br></td> <td><input type="text" name="user[0][age]" value=""></td> <td><input type="text"...

Adding selected attribute to group_concat output in Codeigniter/MYSQL

Hello, I am outputing a simple list of options from dynamic select menus using Codeigniter/MYSQL. CONTROLLER $data['get_custom_fields'] = $this->db->query(" SELECT a.custom_field_name, a.custom_field_id, GROUP_CONCAT('<option name=\"',c.custom_field_value_id, '\" value=\"', c.custom_field_value_id , '\">',c.custom...

How to make inheritance template in Pyrocms?

Pyrocms is using Dwoo template engine. In Dwoo, we can make inheritance template. {extends "default.html"}' but, I can't do this in pyrocms that using Dwoo. ...

Wordpress query in CodeIgniter model

I have the following method in a CI model: function getPostTitle($post_slug) { global $post; $posts = new WP_Query('name=' . $post_slug); while ( $posts->have_posts() ) { $posts->the_post(); return $post->post_name; } } The returned variable is empty. Note that the same code works fine in a view. I need to be able to ...

PHP help multi step form

Hi There, I am creating a multi-step form, and I am struggling to pass around the ID's to each step of the form, below is my code function add_career() { $data = array(); $this->load->model('admin_model'); $this->load->library('form_validation'); if($this->input->post('career_set') == 'Save') { $t...