How to Validate Form fields to database
This question already has an answer here:
我认为它应该工作
$usernamename = $_GET['usernamename'];
$code = $_GET['code'];
$email = $_GET['email'];
$res = mysql_query("SELECT * FROM `table` WHERE `usernamename` = '$usernamename' AND `code` = '$code' AND `email` = '$email' LIMIT 1 ") or die(mysql_error());
if($row = mysql_fetch_assoc($res))
{
header("location:index.php");
exit;
}
链接地址: http://www.djcxy.com/p/3722.html
上一篇: mysql数据库的安全性
下一篇: 如何验证表单字段到数据库