Please help. I am trying to change data in my MySql database. I am able to input new data, but when i try to change anything, it doesn't work. Here is my code:
<?php $id = $_REQUEST['id']; $newname = $_REQUEST['newname']; $newemail = $_REQUEST['newemail']; $newpassword = $_REQUEST['newpassword']; mysql_connect("localhost", "root", "") or die("problem with connection"); mysql_select_db("testsite"); mysql_query("UPDATE users SET name='$newname', email='$newemail', password='$newpassword' WHERE users id='$id'"); echo "Your values have been updated! Now kiss my ass"; mysql_close(); include('links.php'); ?>
I am doing this on a localhost, so the login is correct (and with no password!). As far as i can tell, the problem lies within the mysql_query. But what am i doing wrong? Please keep in mind that I am a total beginner to PHP and MySql databases.