Welcome Guest, Not a member yet? Register   Sign In
form_open working strangely
#1

[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
in the view i have
Code:
echo form_open('/admin/tournament/validate');

but i am redirected to

Code:
example.com/project/admin/tournament/example.com/project/index.php/validate
test.golfpro.co/golf/index.php

the base url is set to
Code:
example.com/project/

What Am I doing wrong ?
Thanks in advance
Oleg
#2

[eluser]Oleg Videnov[/eluser]
Just to mention...
if I edit the base url to
Code:
" "
i.e nothing

it works.

but that's totally strange.

So,any ideas or other solutions ?
#3

[eluser]cideveloper[/eluser]
Take out the forward slash in front of "admin" in the form_open.
#4

[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]

Sad
#5

[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?
#6

[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">
#7

[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/';
#8

[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




Theme © iAndrew 2016 - Forum software by © MyBB