Page 1 of 1

Code not updating the database???

Posted: Fri Aug 11, 2006 3:13 am
by cturner
Why is my code not updating the database from the form data? Can someone please tell me why this is happening and how I could fix it? Thanks in advance.
Here is my code:

Code: Select all

require "config2.php";
$email = $_POST['email'];
$newpassword = $_POST['newpassword'];
$query = "UPDATE users SET 'email'=". mysql_real_escape_string($_POST['email'])."', 'password'=".mysql_real_escape_string($_POST['newpassword']);
echo "Data has been updated.";

Posted: Fri Aug 11, 2006 3:18 am
by JayBird
errr....you didn't execute the query! Image

mysql_query()