Help with php Mail Form Function mail()
Posted: Thu Dec 23, 2004 10:12 am
I am a php noob designing my first complex contact form. I'm using the form found here:
http://www.christian-web-masters.com/ar ... orm-2.html
I'm trying to mix this with a multi-line message. here is my code:
But all I get in my e-mail is the HTML Characters and no dynamic content. How do I get this to work?
http://www.christian-web-masters.com/ar ... orm-2.html
I'm trying to mix this with a multi-line message. here is my code:
Code: Select all
<?php
@extract($_POST);
$Name = stripslashes($FirstName) & " " & stripslashes($LastName);
$Address1 = stripslashes($Address);
$Address2 = stripslashes($City) & ", " & stripslashes($State) & " " & stripslashes($Zip);
$Phone = stripslashes($Phone);
$BestTime = stripslashes($BestTime);
$Email = stripslashes($Email);
$Subject = "Contact Form Information";
$Comments = stripslashes($Comments);
$Message = '
<html>
<head>
<title>Online Contact Form</title>
</head>
<body>
<p>This e-mail was generated by the online contact form on LA Weight Loss contact page.</p>
<br>
<p>Name: <?php $Name ?><br>
<p>Address: <?php $Address1 ?><br>
<p> <?php $Address2 ?><br>
<p>Phone: <?php $Phone ?><br>
<p>Best Time to Contact: <?php $BestTime ?><br>
<p>E-mail Address: <?php $Email ?><br>
<p>Comments: <?php $Comments ?><br>
</body>
</html>
';
mail('bdichiar@al.com',$Subject,$Message,"From: $Name <$Email>");
?>