$sql1="INSERT INTO problem (problem_id,problem_detial,problem_answer,agent_id) VALUES ('','$problem_detial','$problem_answer','$agent_id')";
$result1=mysql_query($sql1);
$cus_id=mysql_insert_id();
$sql2="INSERT INTO customer(cus_id,cus_name,cus_tel,cus_unit) VALUES ('$cus_id','$cus_name','$cus_tel','$cus_unit')";
$result2=mysql_query($sql2);
if($result1<>$result2){
echo "<h2>Can't save to database</h2>";
}else{
echo "<h2>Save to Database Successful !!!!!</h2>";
}