I just don't know what to do, and don't know how to search about this weird problem. Here is is:
All the connection on the page are working correctly, just in case:
I Have this code to update an Email on the Database
$fUsername = mysql_real_escape_string($_GET['user']);
$fPassword = mysql_real_escape_string($_GET['senha']);
$fEmail = mysql_real_escape_string($_POST['fEmail']);
$sql = "UPDATE usuario SET email='$fEmail ' WHERE username = '$fUsername' and senha = '$fPassword'";
$result=mysql_query($sql);
Now, the Problem:
This query is not Updating the "Email" field on the BD. It just makes the field empty.
If I echo the $sql var, I get this: UPDATE usuario SET email='[email protected] ' WHERE username = 'teste1' and senha = 'e10adc3949ba59abbe56e057f20f883e'
If I ran manually this query on the mySQL, it updates the field like I want.
If I manually pass a value to the $fEmail var ($fEmail = "[email protected]"). It works just fine.
The only way that don't work is when I take the value from the Form.
Does anyone have the solution for this? D: