Welcome Guest, Not a member yet? Register   Sign In
Form output issue
#1

[eluser]simon_davies[/eluser]
I have the following code:

Code:
echo form_open('mainmenu', $attributes);

to set up my form and the rest to build and close it, but when I press submit / button the url is appended to the current one and thus not working?

That is I get:

Code:
http://localhost/FOLDERNAME/SUBFOLDER/index.php/mgr/index.php/mainmenu

and should be

Code:
http://localhost/FOLDERNAME/SUBFOLDER/index.php/mgr/mainmenu

the form loads ok with


Code:
http://localhost/FOLDERNAME/SUBFOLDER/index.php

Code:
http://localhost/FOLDERNAME/SUBFOLDER/index.php/mgr/

but it seems to add /mgr/index.php/mainmenu onto the end of the url adding the extra index.php.

Any ideas whats happening and what i am doing wrong?

Thanks in advance
Si
#2

[eluser]simon_davies[/eluser]
well looks like I sorted this out myself:

it seems that my base url was wrong I had it as

Code:
$config['base_url']    = 'http://localhost/FOLDERNAME/SUBFOLDER/index.php/mgr/'';

then amended it to

Code:
$config['base_url']    = 'http://localhost/FOLDERNAME/SUBFOLDER/';

then I updated my form to
Code:
echo form_open('mgr/mainmenu', $attributes); ?>

adding the 'mgr/' to the url


now this seems to work

Many Thanks
Si
#3

[eluser]InsiteFX[/eluser]
Code:
echo form_open('controller/function', $attributes); ?>

InsiteFX




Theme © iAndrew 2016 - Forum software by © MyBB