Hi All.
Yesterday before i went to bed i was well chuffed because i got this little script working. (newbie)
But now when i try to use it i get the error query was empty!
The form that posts the data is below, plus the code it posts it to, any ideas why its now not working???
echo '<form action="activate.php" method="post" name="activate" id="activate">
<input name="username" type="text" id="username">
<input name="code" type="text" id="code">
<input type="submit" name="Submit" value="Submit">
</form>';
<?php require_once('Connections); ?>
<?php
// Check activation code.
// Create variables from URL.
$username = $HTTP_POST_VARS['username'];
$code = $HTTP_POST_VARS['code'];
$sql = mysql_query("UPDATE customers SET activated='1' WHERE username='$username' AND randc='$code'");
mysql_select_db($database_smslist, $smslist);
$sql = mysql_query($insertSQL, $smslist) or die(mysql_error());
$sql_doublecheck = mysql_query("SELECT * FROM customers WHERE username='$username' AND randc='$code' AND activated='1'");
$doublecheck = mysql_num_rows($sql_doublecheck);
if($doublecheck == 0){
echo "<strong><font color=red>Your account could not be activated!</font></strong>";
} elseif ($doublecheck > 0) {
echo "<strong>Your account has been activated!</strong> You may login below!<br />";
}
?>