I think this is a pretty simple issue and I have done it before but I am just not sure what is going wrong. The database updates but not with the password, it just deletes what was there before and replaces it with nothing, so there is a problem with posting the password but I don't know what, the echo password does work. <?php $x = $_GET['x'];$y = $_GET['y']; echo $x;echo $y; echo '<form action="reset.php" method="post">Password <input type="password" name="password" /><input type="submit" value="Submit" /></form>'; $password = $_POST['password']; $link = mysql_connect('x', 'x', 'x'); if (!$link) { die('Could not connect: ' . mysql_error()); } mysql_select_db('unsignedgigs'); $query = "UPDATE users SET `password`='$password' WHERE `username`='$x'"; $result = mysql_query($query) or die (mysql_error()); echo $password; ?> PHP: p.s. I will encrypt escape once I get it working. Thanks
Have you echoed your mysql_error() to see what you are getting there? die(echo mysql_error()); Code (markup): Michael
It has nothing to do with the query. Form submission clears all of your $_GET variables and therefore MySQL doesn't know what to update. Either switch to $_POST completely or at least pass the given data by using additional hidden form fields.