$do_select = mysql_query("SELECT EnquiryId FROM formsubmission WHERE name='$name' AND phone='$phone' AND email='$email' AND message='$message'") or die(mysql_error());
if ($do_select)
{
while ($selected_data = mysql_fetch_assoc($do_select))
{
// Show status
echo "<center>Your Enquiry was successfully submitted and your enquiry id is </center> ";
echo "<center><b>" .$selected_data['EnquiryId'] ."</b></center>";
}
}
enquiryid 是自动递增并从我的 sql 表中获取的,我尝试在 if(do_select) 条件后回显,它有效,这意味着查询正在从数据库中选择查询 id,但不打印 enquiryid,while 条件有一些问题 ??