21,892
社区成员
![](https://csdnimg.cn/release/cmsfe/public/img/topic.427195d5.png)
![](https://csdnimg.cn/release/cmsfe/public/img/me.40a70ab0.png)
![](https://csdnimg.cn/release/cmsfe/public/img/task.87b52881.png)
![](https://csdnimg.cn/release/cmsfe/public/img/share-circle.3e0b7822.png)
$link = $_GET['link'];
$con = mysql_connect("localhost", "mysql_user", "mysql_password");
mysql_select_db("database", $con);
$result = mysql_query("SELECT * FROM 某表 where 某字段='$link'", $con);
$num_rows = mysql_num_rows($result);
if($num_rows > 0){
跳转...
}else{
echo "显示域名非法";
}