[eluser]Unknown[/eluser]
EDIT: Nevermind this post! I already saw the mistake. That's what I get for coding without coffee. Sorry everyone!
Hi, I'm having some trouble with receiving POST data.
I have a login form with the fields 'username' and 'password'. After I send the form, the same controller reads the POST data using $this->input->post() and logs the values of the username and password fields using log_message():
Code:
$username = $this->input->post('username');
$password = $this->input->post('password');
log_message('debug', 'username = '.$username.'; password = '.$password.';');
My problem is that the username field is taking the password field's value, and the password field is coming out blank. For example, if I input the username "user1" and the password "pass1", I get:
Code:
DEBUG - 2009-09-18 23:42:29 --> username = user1; password = ;
Any help would be appreciated.
P.S.: Here follows my login form. Sorry for the spanish.
Code:
<form action="<?=$url_base?>login/" method="POST" id="login" name="login">
<table>
<tr>
<th> </th>
<td>
<select name="logintype" id="logintype">
<option value="normal">ingreso normal</option>
<option value="openid" class="con-icono openid">OpenID</option>
<option value="google" class="con-icono google">Google</option>
<option value="bookface" class="con-icono bookface">Facebook</option>
<option value="lj" class="con-icono lj">Livejournal</option>
<option value="linkedin" class="con-icono linkedin">LinkedIn</option>
<option value="twitter" class="con-icono twitter">Twitter</option>
</select>
</td>
</tr>
<tr>
<th><span id="nombre-label">Nombre / E-mail</span></th>
<td><input type="text" class="t" size="20" id="username" name="username" value="" /></td>
</tr>
<tr>
<th>Contraseña</th>
<td><input type="password" class="t" size="20" id="password" name="username" value="" /></td>
</tr>
<tr>
<th> </th>
<td><input type="submit" class="b" value="Ingresar" /></td>
</tr>
</table>
</form>