CodeIgniter Forums

Full Version: Problem post form
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I'm pretty new with CI, and got a problem with posting a form
for example, i got this code in my view:

<form action="index.php/torrent/add" method="POST">
<input type="text" name="url"/>
<input type="submit" name="submit" value="Add"/>

and no matter what i set as action this form always directs to :

information :
-system is my project folder
-i use IIS

mode rewrite :

<rule name="CI" enabled="true">
<match url="^(.*)$" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<action type="Rewrite" url="index.php/{R:1}" appendQueryString="false" />

anyone the solution ?


El Forum

Try using a full path instead of a relative path in your form action.
&lt;form action="/index.php/torrent/add" method="POST"&gt;
or better
&lt;?php echo form_open('torrent/add'); //will add the index.php automatically (if it's used in your config), POST method is default ?&gt;

El Forum

Afther a lot of testing, i decided to rewrite the project.
And now it actually works great. I did found some wierd test code in my base view.
But not really sure what the problem was.

Still thanks for the support!