![]() |
Help Please - 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: Help Please (/showthread.php?tid=53572) |
Help Please - El Forum - 07-30-2012 [eluser]shyam1326[/eluser] Hi all, I am new to codeigniter, I am trying to create a validation form and when I try and run the form in the browser,I keep getting a 404 error, I have checked all config files and database config, there seems to be nothing wrong, it could be a problem with my route file, what is the normal route path? Thank You Help Please - El Forum - 07-30-2012 [eluser]thisischris[/eluser] Is your computer turned on? Are you sure? (sarcasm) Provide some code... We can't guess... Help Please - El Forum - 07-30-2012 [eluser]shyam1326[/eluser] This is the route.php coding: $route['default_controller'] = 'welcome'; $route['404_override'] = 'errors/page_missing'; every time I run the form, the url says index.php/index.php/form and says a 404 error to check my route.php file. This is my ci controller file: <?php class Form extends CI_Controller { function index() { $this->load->helper(array('form','url')); $this->load->library('form_validation'); $this->form_validation->set_rules('username', 'Username', 'required'); $this->form_validation->set_rules('password', 'Password', 'required'); $this->form_validation->set_rules('passconf', 'Password Confirmation', 'required'); $this->form_validation->set_rules('email', 'Email', 'required'); if ($this->form_validation->run() == FALSE) { $this->load->view('myform'); } else { $this->load->view('formsuccess'); } } } ?> any ideas? Cheers Help Please - El Forum - 07-30-2012 [eluser]tpetrone[/eluser] I think your misunderstand how the router/routing works in CI So.. Try. https://path/to/your/ci_install/index.php/Form the "Form" is your controller.. by default your index() method will be run. |