I am new to using PHP and I am trying to do a PHP mail form with validation check. When the user misses a field or clicks submit I want the message to come up on the same page, no going to another page, and if it's a missed field I'd like it to keep the data which the person has already input. Below is the code I have now for a page I call contact1. php - problem is, I uploaded it and when I tried to test it, I get nothing but a blank page. Haven't even gotten to actually testing the form yet so that may be a whole new issue after I get the page working. Can anyone help? .........thank you Michelle
body tag....
div tags (have some stuff written in html before the form) - close div tags
object tag - for an swf file - closed object tag
div style="position: absolute; width: 389px; height: 100px; z-index: 6; left:596px; top:243px" id="layer5"
<h3> Contact Us </h3>
<?php
if ( $POST['send'] == "blah@blah.com" && $POST['name'] != "" && $POST['email'] != "" && $POST['subject'] != "" && $POST['Reason'] != "" && $POST['message'] != ""){
echo "<p class="one">Thank you for contacting us. Someone will respond as soon as possible.<br />
received name: " . $POST["name"] . "<br /> Age: " .$POST["email"] </p>;
}else{
?>
<form name="contact" method="post" action="<?php $_SERVER['PHP_SELF'] ?>">
<?php
if ( $POST['send'] && $POST['name'] == ""){
echo "<span style=\"color:white;\">Please enter your name</span><br />";
}
?>
<label for="name"><p class="one">Your Name:</p></label>
<input type="text" name="name" id="name" value="<?php echo $_POST['name'] ?>" /><br /><br />
<?php
if ( $POST['send'] && $POST['email'] == ""){
echo "<span style=\"color:white;\">Email address is required</span><br />";
}
?>
<label for="email"><p class="one">Your Email:</p></label>
<input type="text" name="email" id="email" value="<?php echo $_POST['email'] ?>" /><br /><br />
<?php
if ( $POST['send'] && $POST['subject'] == ""){
echo "<span style=\"color:white;\">A subject is required.</span><br />";
}
?>
<label for="email"><p class="one">Subject:</p></label>
<input type="text" name="subject" id="subject" value="<?php echo $_POST['subject'] ?>" /><br /><br />
Reason:
<select name="reason">
<option value="1">General Feedback</option>
<option value="2">Advertising</option>
<option value="3">Privacy Issues</option>
<option value="4">Other</option>
</select><br>
<?php
if ( $POST['send'] && $POST['email'] == ""){
echo "<span style=\"color:white;\">Email address is required</span><br />";
}
?>
<label for="email"><p class="one">Your Message:</p></label>
<textarea name="message" id="message" value="<?php echo $_POST['email'] ?>" cols="30" rows="8" /></textarea><br /><br />
<input type="submit" name="submit" value="Contact Us"></p>
</form>
<?php
}
?>
div...more html etc..etc... /div
script - a script for a rotating banner blah blah /script
end body tag
end html tag