Below mentioned are the code.... Can anybody please help me with this...
Where in this code can I add the action so that after someone fills the contact form it goes to the next page<div id="div1">
<table width="675" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="522" class="calc_deatil_bg">
<div >
<?php if ($_SERVER['REQUEST_METHOD'] != 'POST')
{ $me = $_SERVER['PHP_SELF'] ;?>
<form name="form1" method="post" action="<?=$me?>" >
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="130" height="30" class="calc_text_result">Name</td>
<td width="50" height="30" class="calc_text_result">:</td>
<td width="420" height="30">
<input name="name" type="text" id="name2" class="calcTextField" required size="26" onBlur="notEmpty('name','This field is required','name_message')" /><div id='name_message' class="error_strings"></div></td>
</tr>
<tr>
<td width="130" height="30" class="calc_text_result">E-mail</td>
<td width="50" height="30" class="calc_text_result">:</td>
<td width="420" height="30">
<input name="email" id="email" class="calcTextField" required size="26" type="text" onblur="notEmpty('email','This field is required','email_message'); emailValidator('email','Invalid email','email_message') " /><div id='email_message' class="error_strings"></div> </td>
</tr>
<tr>
<td width="130" height="30" class="calc_text_result">Phone</td>
<td width="50" height="30" class="calc_text_result">:</td>
<td width="420" height="30">
<input name="phno" id="phno" class="calcTextField" required size="10" type="text" onblur="isnumeric('tel','This field is required','tel_message')" /><div id='tel_message' class="error_strings"></div></td>
</tr>
<tr>
<td width="130" height="30" class="calc_text_result">Organization</td>
<td width="50" height="30" class="calc_text_result">:</td>
<td width="420" height="30">
<input name="comp" id="comp" class="calcTextField" required size="26" type="text" onblur="notEmpty('company','This field is required','com_message')" /><div id='com_message' class="error_strings"></div> </td>
</tr>
<tr>
<td width="130" height="30" class="calc_text_result">Address</td>
<td width="50" height="30" class="calc_text_result">:</td>
<td width="420" height="30"><textarea name="addr" id="addr" class="calcTextField" required size="60" type="text" onblur="notEmpty('app','This field is required','app_message')" ></textarea><div id='app_message' class="error_strings"></div></td>
</tr>
<tr>
<td width="130" height="30" class="Body_text3"> </td>
<td width="50" height="30"> </td>
<td width="420" height="30"><input type="submit" id="submit" value=" " class="submitButtonFormat" / ></td>
</tr>
</table>
</form><?php
} else {
error_reporting(7);
// initialize a array to
//hold any errors we encounter
$errors = array();
// test to see if the form was actually
// posted from our form
$page = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
if (!ereg($page, $_SERVER['HTTP_REFERER']))
$errors[] = "Invalid referer<br>\n";
// check to see if detail was entered
if (!$_POST['name'])
$errors[] = "Name is required";
if (!$_POST['addr'])
$errors[] = "Address is required";
if (!$_POST['phno'])
$errors[] = "Phone No is required";
if (!$_POST['email'])
$errors[] = "Email Id is required";
// if there are any errors, display them
if (count($errors)>0) {
foreach($errors as $err)
echo "$err<br>\n";
echo "<br>Please use your browser's Back button to fix.";
} else {
// no errors, so we build our message
$recipient =
'shubhangee.kulkarni@inventurus.in';
$subject = "Cash Calculator Contact Us";
$from = stripslashes($_POST['name']);
$headers = "From: $from";
$msg = "Message sent by $from\n";
$msg.="\nName: ".stripslashes($_POST['name'])."\n";
$msg.="\nEmail Id: ".stripslashes($_POST['email'])."\n";
$msg.="\nCompany: ".stripslashes($_POST['comp'])."\n";
$msg.="\nContact No: ".stripslashes($_POST['phno'])."\n";
$msg.="\nAddress: ".stripslashes($_POST['addr'])."\n";
if (mail($recipient,$subject,$msg,$headers)){
echo "";
} else
echo "An unknown error occurred.";
}
}
?>
</div>
</td>
</tr>
</table>
</div>