我正在将数据从 iphone 应用程序插入到 mysql,但它没有将数据插入到表中我回显结果和输入的值,但它也没有显示任何值
页面的 HTML 代码
<html>
<head>
<title>data to server</title>
</head>
<body>
<form action="surveyAnswer.php" method="post" enctype="multipart/form-data"><br>
<INPUT TYPE = "Text" VALUE ="1" NAME = "survey_question_response_id">
<INPUT TYPE = "Text" VALUE ="1" NAME = "survey_id">
<INPUT TYPE = "Text" VALUE ="1" NAME = "question_id">
<INPUT TYPE = "Text" VALUE ="1" NAME = "survey_response_answer_id">
<input type="submit" value="Upload File">
</form>
</body>
</html>
<?php
$host = "";
$user = "";
$pass = "";
$database = "";
$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");
$survey_question_response_id=$_POST['survey_question_response_id'];
$survey_id=$_POST['survey_id'];
$question_id=$_POST['question_id'];
$survey_response_answer_id=$_POST['survey_response_answer_id'];
echo($survey_question_response_id);
$query=("INSERT INTO survey_question_responses (survey_question_response_id,survey_id,question_id,survey_response_answer_id)
VALUES ('$survey_question_response_id', '$survey_id','$question_id','$survey_response_answer_id')");
mysql_query($query,$con);
printf("Records inserted: %d\n", mysql_affected_rows());
echo($survey_id)
?>