form_open working strangely |
[eluser]Oleg Videnov[/eluser]
Hi guys... I experience some strange problem... I tested on localhost and everything was fine,but when I upload the application on the web.. let's say www.example.com I am on: Code: example.com/project/index.php/admin/tournament/ and I would like to submit to: Code: example.com/project/index.php/admin/tournament/validate Code: echo form_open('/admin/tournament/validate'); but i am redirected to Code: example.com/project/admin/tournament/example.com/project/index.php/validate the base url is set to Code: example.com/project/ What Am I doing wrong ? Thanks in advance Oleg
[eluser]Oleg Videnov[/eluser]
Just to mention... if I edit the base url to Code: " " it works. but that's totally strange. So,any ideas or other solutions ?
[eluser]cideveloper[/eluser]
Take out the forward slash in front of "admin" in the form_open.
[eluser]Oleg Videnov[/eluser]
hey,thanks but... if I take out the forward slash in front of 'admin' it redirects me to: [code]http://example.com/project/index.php/admin/tournament/example.com/project/index.php/admin/tournament/validate[code]
[eluser]cideveloper[/eluser]
Do you have a .htaccess file that could be messing with your urls. When you load the form and do a view source is the "action" pointing to the wrong url "http://example.com/project/index.php/admin/tournament/example.com/project/index.php/admin/tournament/validate"? Or is it just after you submit?
[eluser]Oleg Videnov[/eluser]
it is only after i submit... that's what i get as rendered HTML Code: <form action="website.com/project/index.php/admin/tournament/validate" method="post" accept-charset="utf-8">
[eluser]cideveloper[/eluser]
ok just to clarify does your base url start with http:// because it should. I understand you dont want to put the real url but it would really help. Code: $config['base_url']= 'http://www.example.com/project/';
[eluser]Oleg Videnov[/eluser]
ahhhhhhhhhhhhhhhhhhhhhh!!!!!! IT WORKS so,i had to put http:// in the base_url thanks a lot man well....one more time for me RTFM (read the f**** manual). Thanks a lot man ! Oleg |
Welcome Guest, Not a member yet? Register Sign In |