作者sirak ()
看板PHP
标题[请益] 如何让程式抓取资料库中的网址执行?
时间Fri Jan 23 16:55:09 2009
如题
感谢帮忙我回答的大大们
现在我还有一个问题想要请教一下
那就是我该如何让程式去执行资料库中的网址
附上其撰写之程式
<?php
if($_POST[submit]!=""){
$name=$_POST[name];
$pwd=$_POST[pwd];
$conn=mysqli_connect("localhost","root","root","dbbase");
mysqli_query($conn,"set names big5");
$sql=mysqli_query($conn,"select * from customer where name='".$name."' and pwd='".$pwd."'");
$info=mysqli_fetch_assoc($sql);
if($info!=NULL){
echo "<script>";
echo "alert('登录成功!');";
echo "location.href=".$url.";";
echo"</script>";
}else{
echo "<script>alert('登录失败!');</script>";
}
}
?>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.120.121.237
1F:推 emn178 :何谓"执行资料库中的网址" 你的程式码不是登入的意 01/23 19:47
2F:→ emn178 :思吗? 而且还有安全性漏洞.. 01/23 19:47
3F:推 j87b0003 :应该是这个吧=>header("Location: xxxx"); 01/23 22:19