<?php
If(isset($_POST['submit']))
{
$name=$_POST['user'];
require('connect.php');
global $pdo;
$stmt= $pdo->prepare("select name from user where name=?");
$stmt->bindparam(1,$name);
$stmt->execute();
$row=$stmt->fetch(PDO::FETCH_ASSOC);
if($row==false)
{
die("erorr".print_r($stmt));
}
elseif($row['name']==$name)
{
header("location: mypage.php");
}
else
{
die("please enter your user name and password");
}
}
?>
無差錯代碼PDOStatement對象對象([的queryString] =>選擇名字從用戶其中name =?)erorr1檢查我的代碼幫我PDO語句錯誤校驗碼
值添加完整的錯誤代碼 –