farvantorna Posted October 15, 2008 Share Posted October 15, 2008 I am trying to get this php script to recognize this var as a variability and not text when I send this e-mail. it is so when I send the mail it will look like a forum and contain the input variability . I have a page send the var to php through form action. I am not doing a good job explaining this. !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>sending</title> </head> <?php $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $Message = ' <table width="225" border="1" cellpadding="1" cellspacing="1" bordercolor="#000000" bgcolor="#999900"> <tr> <td width="215"><strong>Name</strong>:' $_GET['name']'; </td> </tr> <tr> <td><label><strong>City</strong>: </label></td> </tr> <tr> <td><label><strong>State:</strong> </label></td> </tr> <tr> <td><label><strong>Zip:</strong> <br /> </label></td> </tr> <tr> <td><strong>Phone:</strong> </tr> <tr> <td><label><strong>e-mail: </strong> </label></td> </tr> <tr> <td><label><strong>Info:</strong> </label></td> </tr> </table> </p> '; $MessageSent = mail('[email protected]', $Subject, $Message,$headers); if ($MessageSent) { echo "<p>The following message was sent successfully:</p><hr />"; echo "<p><strong>From</strong>:$From</p>"; echo "<p><strong>To</strong>:$state</p>"; echo "<p><strong>Subject</strong>:$zip</p>"; echo "<p><strong>phone</strong>:$phone</p>"; echo "<p><strong>email</strong>:$email</p>"; echo "<p><strong>info</strong>:$info</p>"; } else echo"<p>The Message was not sent successfully!</p>"; ?> <body> </body> </html> Link to comment https://forums.phpfreaks.com/topic/128629-solved-need-some-help-with-html-mail/ Share on other sites More sharing options...
prexep Posted October 15, 2008 Share Posted October 15, 2008 Not all variable's set. Link to comment https://forums.phpfreaks.com/topic/128629-solved-need-some-help-with-html-mail/#findComment-666632 Share on other sites More sharing options...
MadTechie Posted October 16, 2008 Share Posted October 16, 2008 do you mean like this ? !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>sending</title> </head> <?php $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $name = $_GET['name']; $Message = ' <table width="225" border="1" cellpadding="1" cellspacing="1" bordercolor="#000000" bgcolor="#999900"> <tr> <td width="215"><strong>Name</strong>:'.$name.' </td> </tr> <tr> <td><label><strong>City</strong>: </label></td> </tr> <tr> <td><label><strong>State:</strong> </label></td> </tr> <tr> <td><label><strong>Zip:</strong> <br /> </label></td> </tr> <tr> <td><strong>Phone:</strong> </tr> <tr> <td><label><strong>e-mail: </strong> </label></td> </tr> <tr> <td><label><strong>Info:</strong> </label></td> </tr> </table> </p> '; $MessageSent = mail('[email protected]', $Subject, $Message,$headers); if ($MessageSent) { echo "<p>The following message was sent successfully:</p><hr />"; echo "<p><strong>From</strong>:$From</p>"; echo "<p><strong>To</strong>:$state</p>"; echo "<p><strong>Subject</strong>:$zip</p>"; echo "<p><strong>phone</strong>:$phone</p>"; echo "<p><strong>email</strong>:$email</p>"; echo "<p><strong>info</strong>:$info</p>"; } else echo"<p>The Message was not sent successfully!</p>"; ?> <body> </body> </html> Link to comment https://forums.phpfreaks.com/topic/128629-solved-need-some-help-with-html-mail/#findComment-666633 Share on other sites More sharing options...
farvantorna Posted October 16, 2008 Author Share Posted October 16, 2008 maybe let me try it out. -edit- It worked Wonderfully! Thank you! Link to comment https://forums.phpfreaks.com/topic/128629-solved-need-some-help-with-html-mail/#findComment-666635 Share on other sites More sharing options...
MadTechie Posted October 16, 2008 Share Posted October 16, 2008 Welcome Link to comment https://forums.phpfreaks.com/topic/128629-solved-need-some-help-with-html-mail/#findComment-666641 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.