I have been working with this for a while now.
User page has a counter that they can reset when they click on a link.
The link goes to a script that updates the counter to zero but when I test it all rows in table update to zero.
$colname_Recordset1 = "-1";
if (isset($_SESSION['MM_Username'])) {
$colname_Recordset1 = $_SESSION['MM_Username'];
}
mysql_query("UPDATE user INNER JOIN registration SET counter=0 WHERE user_name = '$colname_Recordset1'");
$updateGoTo = "account.php";
if (isset($_SERVER['QUERY_STRING'])) {
$updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
$updateGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $updateGoTo));