<?php
$m = "arushi";
$em = "SELECT emailid FROM tblregister WHERE name='$m'";
$q = mysql_query($em);
$n = mysql_fetch_assoc($q);
$fullName = mysql_real_escape_string($_POST['name']);
$address = mysql_real_escape_string($_POST['address']);
$mobNo = mysql_real_escape_string($_POST['dinner']);
$summary = "jsf";
$sql = "INSERT INTO tbljcustomer VALUES('$m', '$n', '$fullName',
'$address','$mobNo', '$summary')";
if(!(mysql_query($sql)))
{
echo "Sorry!!! we were unable to process please try again";
}
else
{
echo "customized";
}
?>
执行此操作时一切正常,只是它不从 tblregister 获取 emailid,而是仅显示 Array 或有时显示资源 id#10。提前致谢