What I'm trying to do on this script is, after a user hits the submit button I want the "form" to dissapear. How do I do that? I only want the confirmation to display.
Here is my code:
<?
if($Submit) {
if($name == "" || $email == "" || $message == "") {
echo "The information you entered was invalid, press back on your browser and make sure that the required fields are entered.";
}
else
{
//mail configuration
$to = "info@iBuddyMedia.com";
$sub = "iBuddy Media - Contact";
$today = getdate();
$month = $today[month];
$mday = $today[mday];
$year = $today[year];
mail($to,$sub,"
iBuddy Media Contact form
Filed on $month $mday, $year
-----------------------------------------------
Name:
$name
$company
$reason
-$message
I.P. Address <br>
$ip
","From: $email" );
echo "Message has been sent to iBuddy Media, you will be contacted shortly";
}
}
?>
<form name="form1" method="post" action="">
<font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Name:*<br>
<input name="name" type="text" id="name">
<br>
Company:<br>
<input name="company" type="text" id="company">
<br>
Email:*<br>
<input name="email" type="text" id="email">
<br>
Reason:<br>
<select name="reason" size="1" id="reason">
<option value="none">(options below)</option>
<option value="Development">Web Development</option>
<option value="Support">Support</option>
<option value="Hosting">Hosting</option>
<option value="Domain">Domain</option>
<option value="Graphics">Graphics</option>
<option value="Other">Other</option>
</select>
<input name="ip" type="hidden" id="ip" value="<? echo $HTTP_USER_AGENT ?>">
<br>
Message:*</strong><br>
<textarea name="message" cols="35" rows="6" id="message"></textarea>
</font><br>
<input type="submit" name="Submit" value="Send to iBuddy Media">
<br>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">* = required for sending</font><br>
</form>