php Mailform not working correctly

Ponincele

New Member
I'm trying to get a mailform working, this is the code im using..\[code\]<table class="mail" table width="400" border="0" align="center" cellpadding="3" cellspacing="1"><tr><td><strong>Contact Form </strong></td></tr></table><table class="mail" table width="400" border="0" align="center" cellpadding="0" cellspacing="1"><tr><td><form name="form1" method="post" action="send_contact.php"><table class="mail" table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td width="16%">Subject</td><td width="2%">:</td><td width="82%"><input name="subject" type="text" id="subject" size="50"></td></tr> <tr><td>Message</td><td>:</td><td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td></tr><tr><td>Name</td><td>:</td><td><input name="name" type="text" id="name" size="50"></td></tr><tr><td>Email</td><td>:</td><td><input name="customer_mail" type="text" id="customer_mail" size="50"></td></tr><tr><td>&nbsp;</td><td>&nbsp;</td><td><input type="submit" name="Submit" value="http://stackoverflow.com/questions/5474530/Send"> <input type="reset" name="Submit2" value="http://stackoverflow.com/questions/5474530/Reset"></td></tr></table></form></td></tr></table></body></html> \[/code\]this is the script that runs..\[code\]<?php// Contact subject $subject ="$subject"; // Details $message="$detail"; // Mail of sender $mail_from="$customer_mail"; // From $header="from: $name <$mail_from>"; // Enter your email address $to ="email"; $send_contact=mail($to,$subject,$message,$header); // Check, if message sent to your email // display message "thanks for sending us a message!" if($send_contact){ Print "<html>"; Print "<head>"; Print "<link href='http://stackoverflow.com/questions/5474530/styles.css' rel='stylesheet' type='text/css' />"; Print "</head>"; Print "<body>"; Print "<img src=http://stackoverflow.com/questions/5474530/images/banner2.png alt='banner' />"; Print "<p>Thanks for sending us a message!, please wait while you are being redirected to the homepage</p>"; Print "</body>"; Print "</html>"; } else { Print "<html>"; Print "<head>"; Print "<link href='http://stackoverflow.com/questions/5474530/styles.css' rel='stylesheet' type='text/css' />"; Print "</head>"; Print "<body>"; Print "<img src=http://stackoverflow.com/questions/5474530/images/banner2.png alt='banner' />"; echo "ERROR"; Print "</body>"; Print "</html>"; } ?>\[/code\]when I put my email in 'email' when it sends I just get a message from @localhost, I know the mailbox is working as I used a different script, but I would like to use this script as I can change font and size.thanks
 
Top