Hi JVassie,
I try that but still not seeing pass to the process form. Here is my process form not sure what i did wrong. I want to have the sessions in page1.php to be sent to an email address like below. I don't want to use hidden field due to don't want to show some details in view source. Thanks.
<?php
session_start();
/* Set e-mail recipient */
$myemail = "hello@gmail.com";
/* Check all form inputs using check_input function */
$time = check_input($_POST['time'], "Preferred time not selected.");
$terms = check_input($_POST['terms'], "Terms and Condition must be checked");
$datesent = date("l, F j, Y, g:i a");
$name = $_SESSION['name'];
$address = $_SESSION['addr'];
$contact = $_SESSION['contact'];
htmlentities ($message, ENT_QUOTES);
/* message for the e-mail */
$message = "
Address: $addr
name:$name
E-mail: $email
Requested Date: $requestdate
Prefer Time: $time
Comments:
$comments
Terms: $terms
";
mail($myemail, $subject, $message);
header('Location: thankyou.php');
exit();
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}
function show_error($myError)
{
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF"><div id="formcontainer">
<table width="380" border="0" cellpadding="0" cellspacing="0" align="center" >
<tr><td width="380" height="10"></td></tr>
<tr><td height="1" class="titleline"></td></tr>
<tr><td height="154" valign="bottom" align="center" class="normal error"><?php echo $myError; ?></td></tr>
<tr><td height="131" align="center"><a href="javascript:history.go(-1)"><img src="../images/buttons/tryagain.png" border="0"></a> </td></tr>
<tr><td height="150"></td></tr></table></div>
</body>
</html>
<?php
exit();
}
?>