$colname_Recordset1 = "-1";
if (isset($_GET['token'])) {
$colname_Recordset1 = $_GET['token'];
}
$colname2_Recordset1 = "-1";
if (isset($_GET['customerid'])) {
$colname2_Recordset1 = $_GET['customerid'];
}
mysql_select_db($database_test, $test);
$query_Recordset1 = sprintf("SELECT customerid, customeremail, random_token, customerpass FROM customers WHERE random_token = %s AND customerid = %s", GetSQLValueString($colname_Recordset1, "text"),GetSQLValueString($colname2_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$colname_Recordset1 = "-1";
if (isset($_GET['token'])) {
$colname_Recordset1 = $_GET['token'];
}
mysql_select_db($database_test, $test);
$query_Recordset1 = sprintf("SELECT customerid, customeremail, customerpass, random_token FROM customers WHERE random_token = %s", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$colname_Recordset1 = "-1";
if (isset($_GET['customerid'])) {
$colname_Recordset1 = $_GET['customerid'];
}
mysql_select_db($database_test, $test);
$query_Recordset1 = sprintf("SELECT customerid, customeremail, customerpass, random_token FROM customers WHERE customerid = %s", GetSQLValueString($colname_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$colname_Recordset1 = "-1";
if (isset($_GET['token'])) {
$colname_Recordset1 = $_GET['token'];
}
$colname2_Recordset1 = "-1";
if (isset($_GET['customerid'])) {
$colname2_Recordset1 = $_GET['customerid'];
}
mysql_select_db($database_test, $test);
$query_Recordset1 = sprintf("SELECT customerid, customeremail, customerpass, random_token FROM customers WHERE random_token = %s AND customerid = %s", GetSQLValueString($colname_Recordset1, "text"),GetSQLValueString($colname2_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
mysql_select_db($database_test, $test);
$query_Recordset1 = sprintf("SELECT customerid, customeremail, customerpass, random_token FROM customers WHERE random_token = %s", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
echo $query_Recordset1;
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$colname_Recordset1 = "-1";
if (isset($_GET['token'])) {
$colname_Recordset1 = $_GET['token'];
}
$colname2_Recordset1 = "-1";
if (isset($_GET['customerid'])) {
$colname2_Recordset1 = $_GET['customerid'];
}
mysql_select_db($database_test, $test);
$query_Recordset1 = sprintf("SELECT customerid, customeremail, customerpass, random_token FROM customers WHERE random_token = %s AND customerid = %s", GetSQLValueString($colname_Recordset1, "text"),GetSQLValueString($colname2_Recordset1, "int"));
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
echo $colname_Recordset1. "\n<br />";
echo $row_Recordset1['random_token']. "\n<br />";
echo $colname2_Recordset1. "\n<br />";
echo $row_Recordset1['customerid']. "\n<br />";
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$colname_Recordset1 = "-1";
if (isset($_GET['customerid'])) {
$colname_Recordset1 = $_GET['customerid'];
}
$coltoken_Recordset1 = "-1";
if (isset($_GET['token'])) {
$coltoken_Recordset1 = $_GET['token'];
}
mysql_select_db($database_test, $test);
$query_Recordset1 = sprintf("SELECT customerid, customeremail, customerpass, customername, customerlastname, random_token FROM customers WHERE customerid = %s AND random_token = %s", GetSQLValueString($colname_Recordset1, "int"),GetSQLValueString($coltoken_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $test) or die(mysql_error());
if ($row_Recordset1['random_token']==$coltoken_Recordset1) {
echo "Tokens match<br />\n";
}else{
echo "don't match";
}
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if ($row_Recordset1['random_token']==$coltoken_Recordset1) {
echo "Tokens match<br />\n";
}else{
echo "don't match";
}
<form action="<?php echo $editFormAction; ?>" id="form1" name="form1" method="POST">
<table width="65%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td width="9%"> </td>
<td bgcolor="#D71820"><span class="headingtext">FORGOTTEN PASSWORD<strong>
<input name="token" type="hidden" id="token" value="<?php echo md5(mt_rand()); ?>" />
<input name="customerid" type="hidden" id="customerid" value="<?php echo $row_Recordset1['customerid']; ?>" />
</strong></span></td>
</tr>
<tr>
<td> </td>
<td class="headingtext">If that email address is registered with us, you should receive an email shortly. </td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1" />
</form>
<script>
document.form1.submit();
</script>