Simple Form Validation question! - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Simple Form Validation question! (/showthread.php?tid=29990) |
Simple Form Validation question! - El Forum - 04-28-2010 [eluser]arbme666[/eluser] Hey all, I'm new to CI and just have a quick question. After running form validation like below how do you call the validated and clean data. Code: set rules code... Would this be correct or am I just calling data that has not been validated. Thanks Simple Form Validation question! - El Forum - 04-28-2010 [eluser]steelaz[/eluser] Input will have clean data after you validated it, so it's safe to use: Code: $username = $this->input->post('username'); Simple Form Validation question! - El Forum - 04-28-2010 [eluser]WanWizard[/eluser] If the form validated succesfully, the values of the $_POST are updated with the result of the validation, so yes, your input has been validated (and cleaned if you asked it to). Simple Form Validation question! - El Forum - 04-28-2010 [eluser]arbme666[/eluser] Thanks again for the quick reply. One more question is there any way for the user to specify how long they want until the session cookie will expire? A way of overriding the $config['sess_expiration'] so when the users login they can input say 30mins? I have tried to destroy the session cookie and make a new one but with no luck. Maybe someone could point me to some links etc. Code: function _set_cookie($expire) Thanks again! Simple Form Validation question! - El Forum - 04-29-2010 [eluser]WanWizard[/eluser] You can modify the session expiration variable at runtime: Code: $this->session->sess_expiration = 60*30; // set it to 30 minutes |