我对php很新,我似乎无法找到我的错误。我正在努力让一个regestration表单起作用,这是我迄今为止所做的项目的开始,我希望任何人都可以提供帮助。谢谢
<?php
$pdo = new PDO('mysql:host=localhost;dbname=PoetsIN;charset=utf8', 'root', '');
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION)
include('/classes/DB.php');
if (isset($_POST['createaccount'])) {
$username=$_POST['username'];
$password=$_POST['password'];
$email=$_POST['email'];
DB::query(INSERT INTO users VALUES (\'\', :username,:password,:email)', array(':username=>$username, ':password'=>$password, ':email'=>$email));
回声“成功!”;
}
?&GT;