Welcome Guest, Not a member yet? Register   Sign In
Form submission not working with my hosting service
#1

[eluser]MissionMan[/eluser]
This is my login view:

<?php echo form_open('main/login'); ?>
<label for="user_id">User ID:</label>
&lt;input type="text" name="user_id" id="user_id" value="&lt;?php echo set_value('user_id'); ?&gt;" /&gt;&lt;br>
<label for="password">Password:</label>
&lt;input type="password" name="password" id="password" value="&lt;?php echo set_value('password'); ?&gt;" /&gt;&lt;br>

&lt;input type="submit" name="submit" id="submit" value="OK" /&gt;&lt;br>
&lt;?php echo trim(form_error('user_id')); ?&gt;
&lt;?php echo trim(form_error('password')); ?&gt;
&lt;/form&gt;



This works fine on my local computer, but when I try it on my hosted public server, I get a "404 Page Not Found" error message when I click the "Submit" button. I have tried including "index.php", but that doesn't work either. When I look at the source, I see:

action="http://www.mywebsite.mobi/main/login"

When I use the standard Codeigniter .htaccess file, I get an internal server error. I delete the .htaccess file and I at least get to my default controller, which displays the login form.

This is one thing that may be affecting things. My .mobi domain has been set up as a subdirectory of my main com.au domain. So my Codeigniter installation is actually located in mydomain.com.au/mobi, and through the use of a clever .htaccess file, when I type in mydomain.mobi, the browser is actually redirected to mydomain.com.au/mobi.

Where should I be looking for a solution? I did a search of the forums and didn't find anything that helped.
#2

[eluser]Harold Villacorte[/eluser]
Have you set the base_url and index_page in the config file?
#3

[eluser]MissionMan[/eluser]
I've actually moved my mobile site directly onto my com.au domain, and it seems to be working as expected. There is something not quite right with the way my .mobi domain has been set up, so I need to look into that.
#4

[eluser]Unknown[/eluser]
Why don't you contact your website hosting service? If you have good support, the problem should have been resolved already. Maybe you need another provider? The British company Weloveourhost offers better support 24/7/365 through email and phone and they usually resolve this type of problems and other issues, no matter how complicated, within 5 minutes. Good luck!




Theme © iAndrew 2016 - Forum software by © MyBB