<?php session_start();
$ses_id = session_id(); // DO NOT REMOVE THIS LINE!
$_SESSION['ses_id'] = $ses_id; // OR THIS ONE!
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<title>Contact Form</title>
<style type="text/css">
body {
margin: 0px;
padding: 100px;
background: #fafafa;
font-family: verdana, Arial, sans-serif;
font-size: 11px;
line-height: 18px;
}
#Wrapper {
margin: 0 auto;
padding: 10px;
width: 500px;
background: #fff;
border: 1px solid #999999;
}
fieldset {
margin: 0px;
padding: 0px;
border: 0px;
}
legend {
display: none;
}
input, textarea {
margin: 0px;
padding: 1px;
font-family: Courier, monospace;
font-size: 11px;
border: 1px solid #999999;
}
span.cursor {
cursor: pointer;
}
p#Error_msg {
color: red;
}
</style>
</head>
<body>
<div id="Wrapper">
<?php
$Error = $_GET['error'];
if(isset($Error)) {
echo '<fieldset><legend>Contact Form</legend>'."n";
echo '<form action="thank_you.php" method="post">'."n";
echo '<p><label for="name"><strong>Name :</strong></label><br />'."n";
echo '<input type="text" name="name" id="name" tabindex="1" size="40" value="'.$_SESSION['name'].'" /></p>'."nn";
echo '<p><label for="email"><strong>E-mail address :</strong></label><br />'."nn";
echo '<input type="text" name="email" id="email" tabindex="2" size="40" value="'.$_SESSION['email'].'" /></p>'."nn";
echo '<p><label for="comment"><strong>Questions / Comments :</strong></label> (<span class="cursor" onclick="document.getElementById('comment\').rows += 5;" title="Increase The Textarea">increase</span> » <span class="cursor" onclick="document.getElementById('comment').rows -= 5;" title="Decrease The Textarea">decrease</span>)<br />'."n";
echo '<textarea cols="50" rows="5" name="comment" id="comment" tabindex="3">'.$_SESSION['comment'].'</textarea></p>'."nn";
echo '<p id="Error_msg">'.$_SESSION['errormsg'].'</p>'."nn";
echo '<p><input type="submit" name="submit" value="submit" class="submit" tabindex="4" /> <input type="reset" value="reset" class="submit" tabindex="5" /></p>'."n";
echo '</form>'."n";
echo '</fieldset>'."n";
} else {
?>
<fieldset><legend>Contact Form</legend>
<form action="thank_you.php" method="post">
<p><label for="name"><strong>Name :</strong></label><br />
<input type="text" name="name" id="name" tabindex="1" size="40" /></p>
<p><label for="email"><strong>E-mail address :</strong></label><br />
<input type="text" name="email" id="email" tabindex="2" size="40" /></p>
<p><label for="comment"><strong>Questions / Comments :</strong></label> (<span class="cursor" onclick="document.getElementById('comment').rows += 5;" title="Increase The Textarea">increase</span> » <span class="cursor" onclick="document.getElementById('comment').rows -= 5;" title="Decrease The Textarea">decrease</span>)<br />
<textarea cols="50" rows="5" name="comment" id="comment" tabindex="3"></textarea></p>
<p><input type="submit" name="submit" value="submit" class="submit" tabindex="4" /> <input type="reset" value="reset" class="submit" tabindex="5" /></p>
</form>
</fieldset>
<?php } ?>
</div>
</body>
</html>