作者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