Help Please |
[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
[eluser]thisischris[/eluser]
Is your computer turned on? Are you sure? (sarcasm) Provide some code... We can't guess...
[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
[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. |
Welcome Guest, Not a member yet? Register Sign In |