我正在尝试连接本地服务器的Mamp,但是我收到了这个错误 无法加载资源:服务器响应状态为500(内部服务器错误)
如果你能帮我解决这个错误。
Php代码:
<?php
//insert.php
$data=json_decode(file_get_contents("php://input"));
$student_Id = mysql_real_escape_string($data->student_Id);
$lastName = mysql_real_escape_string($data->lastName);
$firstName = mysql_real_escape_string($data->firstName);
$grade = mysql_real_escape_string($data->grade);
$gender = mysql_real_escape_string($data->gender);
mysql_connect("localhost","root","");
mysql_select_db("SchoolTeam");
mysql_query("INSERT INTO Student (`student_Id`, `lastName`, `firstName`, `grade`, `gender`) VALUES ('".$student_Id."', '".$lastName."', '".$firstName."', '".$grade."','".$gender."')");
?>