Validation and view page problem. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Validation and view page problem. (/showthread.php?tid=46653) |
Validation and view page problem. - El Forum - 11-09-2011 [eluser]Unknown[/eluser] Hi, I had some question about validation. URL: /ItemDetail/5 ItemDetail is the Controller Name 5 is the Item ID at this page, visitor can post a price and submit to the website, so I need to do a validation for the Price field. Code: <?=form_open('ItemDetail/validatebid'); ?> In this form, I create a function name ItemDetail/validatebid for the validate: Code: $this->form_validation->set_rules('price', 'price', 'trim|numeric|max_length[6]'); problem occur: when user input pass the submit button, it will go to ItemDetail/validatebid for validation, at that time, the Item ID didn't contain the Item ID in segment(2), I can't display proper Item Information. How can I fix this problem? |