codeigniter

2 Way Encryption Passwords?

Question says it all, should passwords be stored using 2 way encryption or just 1 way? ...

Codeigniter best practices with external stylesheets, scripts, includes, etc...

Ok so I've been studying Codeigniter and PHP for a week or so now and I'm ready to begin my first site. I'm wondering what are best practices for handling files that aren't Models, Views, or Controllers? Such as includes, stylesheets, javascript files (like my jQuery), etc... From the tutorials I read, I've developed a habit of taking...

[SOLVED] Are input->post arrays possible in codeigniter? I'm using doctrine and need to combine my birthday dropdown for db insert

I have just finished creating my signup form and now ready to insert data into the datebase using doctrine. Everything inserts fine but in my var_dump my birthday dropdown is in 3 seperates... day , month and year.. I would like to combine them and post as "birthday" into the db with doctrine. I wish to do this in my controller, please ...

codeigniter multiple join conditions on same table

Basically i want to join a table where a col in table A matches a col in table B and where a col in table B is equal to 0. I am using codeigniters active record class. Thanks in advance. ...

CodeIgniter: invoking multiple controllers in one call

I am solving a kind of architectural problem inside CI. I need to be able to instantiate other controllers and their methods in main controller. E.g. *main.php/function index():* $controller2 = new Controller2(); $data['pre_loaded_data'] = $controller2 ->ajax_get_some_view(array('static'=>true)); The goal behind this approach is to bu...

How do I configure nginx and CodeIgniter?

I'm running nginx on my home computer for development. I also have it linked to DynDNS so I can show progress to my co-worker a bit easier. I can't seem to get nginx to rewrite to CodeIgniter properly. I have CodeIgniters uri_protocol set to REQUEST_URI. All pages that should be showing up wtih content show up completely blank. If I ph...

How to escape '/' in codeigniter, php?

Hey guys. I'm having this silly issue with inserting text with forwardslash into cart in codeigniter. When it's plain string it's fine but when inserting, say, "compact / compact" it's not doing it. My guess is that '/' needs to be somehow escaped. I tried hmtlspecialchars(), htmlentities() and even addslashes() - none of the worked. Doe...

codeigniter controller

I want to write a new controller file f.g. aaa.php, there is a function bbb() in aaa.php, how can i enter aaa.php's bbb(), The example files are begin with welcome.php's index() function. how can I change that to begin with my new controller file? ...

Codeigniter - Disable XSS filtering on a post basis

Hi, I'm trying to set up a CMS on the back of a site but when ever post data has a I've got $config['global_xss_filtering'] = TRUE; in config My question is there a way of disabling xss filtering for one item? e.g. $this->input->post('content', true); - turns it on, but how to turn it off? Thanks everyone. PVS ...

codeigniter: private properties in controller

hello is it a good practice to use private properties in codeigniter controllers ? for example <?php class X_controller extends Controller{ private $data; function __construct(){ parent::Controller(); $this->data = "xx" } function index(){ //use $this->data somewhere ...

Codeignitor - Multifile plugin ?

I have a php application that doesn't use the mvc model that i would like to add to my codeigniter app as an plugin only issue is the CI documentation seems like it only supports one file plugins. What is the best way to go about implementing an extension? ...

PHP framework with good user login/admin

I am looking for a good PHP framework with a good user login & admin. I have looked at Codeigniter, but the user admins I have found seem dated. I have been looking at at Kohana, but have not been able to find a viable login / admin pannel? I basically need: User login User verification of new user User p/w reset Admin add/edit/del ...

Codeigniter: Storing User's role in Session

Is it safe to store the user's role in Codeigniter's session? The role will determine what function the user will have; that is being a admin, a regular subscriber, or a premium user. I am also storing the session in a database for additional security, but I would like to know if I should use a alternate route, such as querying the use...

CodeIgniter ActiveRecord problems

Hi. I'm trying to build my first app on CodeIgniter. This is also my first time trying to stick to OOP and MVC as much as possible. It's been going ok so far but now that I'm trying to write my first model I'm having some troubles. Here's the error I'm getting: A Database Error Occurred Error Number: 1064 You have an error ...

do i use ci_sessions to store session data

Hi, Im developing site for a travel site, in the process when a user searches I do manipulation on the database result then store it in session. Which stores the data in the ci_session database. By following this method I'm able to easily filter the data from $this->session->userdata(); A normal search which results in 4 hotels th...

SQL Injection and Codeigniter

Some doubts regarding Codeigniter and its Input handling capabilities. Some may be a little weird but they are doubts none-the-less. If I use the Active Record Class functions in CodeIgniter, is my input prevented against SQL injection? I read somewhere that it does, but I don't understand it how? or why? Also does xssclean deal with S...

IPN simulator 403 with codeigniter

i get a 403 with the IPN simulator my site is online (not on localhost) and i m using the paypal_lib library any idea what could cause this? this is the message from the IPN simulator : IPN delivery failed. HTTP error code 403: Forbidden ...

CodeIgniter Working with multiple Databases

Hello, I am trying to list all the mysql databases and their respective tables, I am currently using this, but can anybody recommend if there is any better way. $q = $this->db->query('SHOW DATABASES'); $databases = $q->result_array(); foreach($databases as $db) { $this->db->query('USE '. $db['Database']); $q = $this->db->query('S...

PHP +CodeIgniter , RestFul Url without MVC?

I would use CodeIgniter in my new project, but i only use the helper function, so Can i run my php script as CodeIgniter restful Url function but not in MVC? or i can done by Apache rewrite mod instead? ...

How to sort and put in tables according to customer with php.

I have following db in mysql. CREATE TABLE IF NOT EXISTS `be_users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(32) NOT NULL, ... `active` tinyint(1) unsigned NOT NULL DEFAULT '0', `group` int(10) unsigned DEFAULT NULL, ... ); INSERT INTO `be_users` (`id`, `username`, `password`, `email`, `active`, `group`,...