Welcome Guest, Not a member yet? Register   Sign In
$_POST and $this->input->post() are always empty on localhost site
#26

[eluser]Crackz0r[/eluser]
[quote author="Chathuranga Tennakoon" date="1330946373"]you have not specified the HTTP method in the form_open function.


Code:
>

<?php echo form_open('users/login', array('id'=>'login')); ?>


just try to add the POST method to form_open function as follows
Code:
>

<?php echo form_open('users/login', array('id'=>'login','method'=>'post')); ?>
[/quote]

Well actually by default CodeIgniter sets the method to POST when you dont specify any method as parameter... Now... i think its about mod_rewrite (rewrite_module in wampserver)... and ofc... keep in mind what InsiteFX said about configuration -> $config['uri_protocol'] = "REQUEST_URI"; in the other hand... check your htaccess file maybe something is wrong... here is mine:

Code:
<IfModule mod_rewrite.c>
    Options     +FollowSymLinks
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    # If we don't have mod_rewrite installed, all 404's
    # can be sent to index.php, and everything works as normal.
    # Submitted by: ElliotHaughin

    ErrorDocument 404 /index.php
</IfModule>

Try this out and let us know.

Regards


Messages In This Thread
$_POST and $this->input->post() are always empty on localhost site - by El Forum - 03-22-2012, 02:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB