我的脚本有问题:
<?php
include('includes/header.php');
include("includes/config.php");
$email = $_GET['email'];
$key = $_GET['key'];
$email = strip_tags($email);
$email = trim($email);
$key = strip_tags($key);
$key = trim($key);
$sql = mysql_query("SELECT * FROM confirm WHERE email = '$email' AND key = '$key'
ORDER BY id ASC LIMIT 1")or die(mysql_error());
while($result = mysql_fetch_array($sql))
{
$key2 = $result['key'];
$email2 = $result['email'];
}
if($key == $key2 && $email == $email2){
$sql = mysql_query("UPDATE users SET user_confirm = 1 WHERE user_mail = '$email2'")or
die(mysql_error());
$sql = mysql_query("DELETE FROM confirm WHERE email = '$email2'")or die(mysql_error());
echo "Your account have been activated, and is ready to use!";
}else{
echo 'You have entered wrong key or the key is invalid!';
}
include('includes/footer.php');
?>
'key = (keyvalue here)' 附近出现语法错误
有谁知道我在这里做错了什么?