hey
i posted earlyer today with a poll problem and you guys did an awsum job helping me out, so here i go again.
I have a contact form on my site, which when the user fills out all the forms it takes them to the thank you page, and if they dont fill it out proprely it tells them, so this is all fine except i dont recive any emails, lol could this be becasue i cant do it from my own computer?
[URL]http://b_ball_player9.cjb.cc/contact.html[/URL]
any info would be greatly appriected
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>Milo's Portfolio</title>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Revisit-After" content="5 Days">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link href="file.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="favicon.ico" >
<link rel="alternate stylesheet" type="text/css" href="file.css" title="swap1" >
<link rel="alternate stylesheet" type="text/css" href="file2.css" title="swap2" >
<script type="text/javascript" src="styleswitcher.js"></script>
</head>
<body>
<div id="container_blue">
<div id="brown_button">
<a href="index.html"><img src="images/home_button.gif" alt="Home" border="0" /></a></div>
<div id="red_button">
<a href="portfolio.html"><img src="images/port_button.gif" alt="Portfolio" border="0" /></a></div>
<div id="blue_button">
<a href="contact.html"><img src="images/contact_button.gif" alt="Home" border="0" /></a></div>
<div id="green_button">
<a href="about.html"><img src="images/about_button.gif" alt="Portfolio" border="0" /></a></div>
<div id="contact_form">
<form method="post" action="send.php">
Name:<br><input name="name" type="text" size="30"><br><br>
Email:<br><input name="email" type="text" size="30"><br><br>
Comments:<br><input name="subject" type="text" size="30"><br><br>
Message:<br><textarea name="msg" cols="25" rows="6"></textarea><br><br>
<input type="reset" value="Reset"> <input type="submit" value="Send">
</form>
</div>
<div id="valid">
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01 Transitional" height="31" width="88" border="0" ></a>
<img src="images/validcss.gif" alt="Valid CSS" /></div>
</div>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Revisit-After" content="5 Days">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Thank you for contacting us</title>
<link href="file.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" href="favicon.ico" >
<link rel="alternate stylesheet" type="text/css" href="file.css" title="swap1" >
<link rel="alternate stylesheet" type="text/css" href="file2.css" title="swap2" >
<script type="text/javascript" src="styleswitcher.js"></script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" alink="#0000FF" vlink="#0000FF">
<h1>Thank you for contacting us</h1>
<!-- your html -->
<div id="container_blue">
<div id="brown_button">
<a href="index.html"><img src="images/home_button.gif" alt="Home" border="0" /></a></div>
<div id="red_button">
<a href="portfolio.html"><img src="images/port_button.gif" alt="Portfolio" border="0" /></a></div>
<div id="blue_button">
<a href="contact.html"><img src="images/contact_button.gif" alt="Home" border="0" /></a></div>
<div id="green_button">
<a href="about.html"><img src="images/about_button.gif" alt="Portfolio" border="0" /></a></div>
<?php
$to = "b_ball_player9@hotmail.com"; // change to your email address
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$msg = $_POST['msg'];
$d = date('l dS \of F Y h:i:s A');
$sub = "form to mail";
$headers = "From: $name <$email>\n";
$headers .= "Content-Type: text/plain; charset=iso-8859-1\n";
$mes = "Subject: ".$subject."\n";
$mes .= "Message: ".$msg."\n";
$mes .= "Name: ".$name."\n";
$mes .= 'Email: '.$email."\n";
$mes .= 'Date & Time: '.$d;
if (empty($name) || empty($email) || empty($subject) || empty($msg))
{
echo " <h3>Sorry all fields are required.</h3>";
}
elseif(!ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
print " <h3>Sorry the email address you entered looks like it's invalid.</h3>";
}
else
{
mail($to, $sub, $mes, $headers);
print " <h3><center>Thank you ".$name." for contacting us.<br>We will get back to you as soon as posiable</center></h3>";
}
?>
<div id="valid">
<a href="http://validator.w3.org/check?uri=referer"><img
src="http://www.w3.org/Icons/valid-html401"
alt="Valid HTML 4.01 Transitional" height="31" width="88" border="0" ></a>
<img src="images/validcss.gif" alt="Valid CSS" /></div>
</div>
</body>
</html>