I am trying to create a "reset" for a password. The coding I have resets all the passwords in that table. Not just of that particular user. What am I doing wrong.
<?php
/*if(!$auth=="ok")
{
header ( "Location:login.html");
exit;
}
*/
$id=="id";
include("config.php");
$connection=mysql_connect($hostname,$user,$pass) or die ("Failed to connect.");
mysql_select_db($dbname,$connection) or die ("Cannot connect to DB");
$uid = "SELECT * FROM test WHERE username='$username'";
$query_uid = "UPDATE test SET password='temp'";
mysql_query($query_uid) or die('Error, query failed');
?>