Uncaught Error: mysqli_stmt_bind_param(): Argument #3 cannot be passed by reference
因為mysqli_stmt_bind-param(),只能使用變數:
mysqli_stmt_bind_param($stmt, "i", 1);
要改為:
mysqli_stmt_bind_param($stmt, "i", $postid);
如果一定要寫死,那就寫在$sql裡
$sql="iINSERT INTO `user` (`account`, `password`, `role`, `name`, `created_at`) VALUES (?, ?, 'U', ?, now())";