GIF89a;
| Direktori : /home/serb/www/ |
| Current File : /home/serb/www/sendmail-process.php |
<? session_start();
include("lib/globals.php");
include("lib/common.php");
include("lib/functions.php");
?>
<?
if($_POST)
{
if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) ) {
/*$dob=$_POST['year'].'-'.$_POST['month'].'-'.$_POST['day'];*/
$ins="SELECT * FROM post_ad WHERE id='".$_GET['postid']."'";
$res_emailid=execute_query($ins);
$row_emailid=mysql_fetch_array($res_emailid);
$pro_emailid=$row_emailid['email_adds'];
$to=$pro_emailid;
$subject="You Have A Message From a Customer";
$body=$_POST['urQuery'];
$from=$_POST['emailAddrs'];
sendEmail($to, $subject, $body, $from);
// mail($to, $subject, $body, $from);
$loc="send_mail.php?msg=success";
unset($_SESSION['security_code']);
?>
<script language="javascript">
location.href="<?=$loc?>";
</script>
<?
}
else { ?>
<script language="javascript">
alert("Sorry, you have provided an invalid security code");
location.href="send_mail.php?postid=<?=$_GET['postid']?>";
</script>
<? }
}?>