Codeigniter and Form
I have a problem with Codeigniter and my hosting provider...
I have created a form with function form_open('welcome/index') and it produces this html code
<form action="http://gggg.com/index2.php/welcome/index" method="post">
but this doesn't work, infact when I submit the form I will return in the same page without effects.
I开发者_如何学Python have to say that there are no errors in the code, because it works in localhost and works also if I write form_open('http://gggg.com/index2.php/welcome/index')
.
So, in summary if I write:
form_open('welcome/index')
, it doesn't work
else if I write:
form_open('http://gggg.com/index2.php/welcome/index')
, it works
It's very strange, can anybody help me?
If you are not modified your htaccess to allow URLs like http://ggg.com/controller/function/param1, you should always add 'index2.php' and the beginning of all of your URLs.
Try to modify using form_open('index2.php/welcome/index')
.
Anyways, check your config.php file just how Michael told you.
It would help to know what URL it is actually sending the form data to.
You need to look through your config file. Make sure the correct values are set for:
$config['base_url'] = "http://gggg.com/";
$config['index_page'] = "index2.php";
Also make sure you htaccess files are correct, if you are running on Apache.
精彩评论