CodeIgniter Forums

Full Version: Form output issue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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

El Forum

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

InsiteFX