Insert title here
registerProc.php Post处理代码
Insert title here prepare($sql); $sth->execute(array($username,$password,$registdate)); if($sth->rowCount()) { echo "insert success"; } else { echo "insert error"; } $conn = null; ?> 注册成功,请登录或继续注册
db.php 连接数据库代码
query("set names utf8"); }catch(PDOException $e){ die("mysql connected error: ".$e->getMessage()); }?> 是PDO写错了吗?我找了好久都没发现在哪出错。我用的数据库是MySQL server 5.6版本的,PHP5.3
回复讨论(解决方案)
print_r($sth->errorInfo());
谢谢!!@xuzuning