我有带有个人详细信息的表格,需要通过电子邮件提交和接收。如果条件没有我的空表格,我会通过一些。但这似乎不起作用。
<?php
ob_start();
$SuccessRedirect = 'sucessfully_submitted.html';
$to ='sanaullahkhan81@gmail.com';
$name =$_POST['name'];
$email =$_POST['email'];
$ph_name =$_POST['phone'];
$model =$_POST['model'];
$imei =$_POST['imei'];
$message =$_POST['message'];
$subject ='Customer Phone Details for Selling from: '.$name ;
$actul_msg ='A Message from Contact Us Page'. "\n".'Name: '.$name."\n".' Eamil:
'.$email."\n" .'Phone Name:'.$ph_name."\n".'Model:'.$model."\n".'IMEI No:'.$imei."\n".'
Message: '.$message;
if(!empty($name) || !empty($email) || !empty($ph_name) || !empty($model) || !empty($imei))
{
mail($to,$subject,$actul_msg);
header('Location: '.$SuccessRedirect);
}
else
{
echo '<script type="text/javascript">alert("A Name:, Email:, Message: is required ");
</script>';
include('quote.html');
}
ob_end_clean();
?>