validation class with multiple pages - 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: validation class with multiple pages (/showthread.php?tid=3131) |
validation class with multiple pages - El Forum - 09-12-2007 [eluser]Unknown[/eluser] hi, i am new to CodeIgniter. i am using Validation class with 4pages forms like this page1 -> page2 -> page3 -> page 4 Code: $this->load->library('validation'); it works fine with page1, but not page2 nor page3, page4 when i use redirect insteed of $this->page2(), validation works fine but $_POST[] returns "NULL"; Code: redirect('page2', 'location'); is there any way i can use Validation class with multiple pages?? please help me!! thanks validation class with multiple pages - El Forum - 09-12-2007 [eluser]xwero[/eluser] If you want to redirect your page you have to process the $_POST data before you redirect Code: $this->load->library('validation'); You could create a function to check if the user can proceed to the next page or not Code: function page1(){ validation class with multiple pages - El Forum - 09-12-2007 [eluser]Michael Wales[/eluser] I find the easiest way to do multiple page forms is treat them as completely seperate forms. psuedo-code Code: // Page 1 Code: // Page 2 validation class with multiple pages - El Forum - 09-12-2007 [eluser]Unknown[/eluser] thanks xwero thanks walesmd so there is no way i can reset Validation class like, Code: $this->validation->run() = FALSE i will use Database to save the Form data this time thank you for your help!! |