Welcome Guest, Not a member yet? Register   Sign In
form validation url
#1

[eluser]Vikeoar[/eluser]
I'm new to CI and so far enjoying it very much. I'm working through the validation class example in the user guide, found at:
http://ellislab.com/codeigniter/user-gui...ation.html

I'm making a simple email contact form.

I have the controller contact.php and view, also contact.php working just fine. When I view:
http://localhost/contact

I get my contact form, no problems.

The issue starts when I add validation. If validation fails it goes back to /contact view as expected. However, index.php shows in the url: like so:
http://localhost/index.php/contact

The validation works, it's just the index.php showing up in the url. If validation is successful, it goes to the success view (just as in the user guide example), but again the url is:
http://localhost/index.php/contact

I have the standard .htaccess file set up as laid out in the user guide.

I can't figure out why index.php keeps showing up in the url. Is there something I'm missing in the configuration of the application?

Thanks to anyone in advance if you can help.
#2

[eluser]Armchair Samurai[/eluser]
Check your config.php to make sure you've set the index_page attribute to blank.
#3

[eluser]Vikeoar[/eluser]
Wow! Quick reply. Thanks, that did the trick. I knew it would be something simple that I was overlooking.

Thanks again for the quick response.




Theme © iAndrew 2016 - Forum software by © MyBB