插入數據提示有問題,盼指教
<?php
require_once('connect.php');
$username=$_POST['username'];
$password=$_POST['password'];
$insertsql = insert into user(username,password) values('$username','$password');/*總是提示這一行有問題*/
if(mysql_query($insertsql)){
echo "<script>alert('注冊成功');window.location.href='register.php';</script>";
}else{
echo "<script>alert('注冊失敗');window.location.href='register.handle.php';</script>";
}
?>
2019-01-16
少了一個引號