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

[eluser]ian[/eluser]
@osci,

I understand that there won't be POST values before submitting; I'm concerned with the values I'm not getting AFTER posting. I believe a redirect would clear POST values, yes, but there isn't a redirect until AFTER a successful login.

Also, I appreciate you taking the time to give coding tips, but I'm not really worried right now about form/efficiency (I didn't even write this code, but I am trying to build on it). I'm not denying that it could use some refactoring. Not to overstate it, but this code works on a production server, which is why I believe it's related either to subtleties in my MAMP setup or a URL path that might act oddly on a server configured for a localhost virtual host.

Regarding your edit about form_open(’/users/login’); ... double-check it. I am using form_open(’users/login’); without the slash at the beginning.

Quote:Why not use your view without passing that array and use set_value from form_helper?
I don't understand how this would help my problem, but I'm also not sure how form_helper works. There might be a better way than to use the $user_data array, but I just don't understand why I get blank value when I print the value of a posted variable, for example,
Code:
log_message('error', $this->input->post('email'));
at the beginning of my login() function in my controller after doing a post.


Messages In This Thread
$_POST and $this->input->post() are always empty on localhost site - by El Forum - 06-21-2011, 01:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB