Sethers Posted March 8, 2008 Share Posted March 8, 2008 Alright, I have collected different elements to make a fporm using PHP. No databases are used so what you see is what you get. It's working perfectly and quickly, exept when I recieve the email, the font is not what I want it to be. Let me explain: <html> <style type="text/css"> p.sample { font-family: verdana; font-size: small; } </style> <head><meta http-equiv="refresh" content="0;URL=http://www.coco-chanel.co.uk/index.php"></head><body><?php $mymail = 'uttermaniac@aol.com'; $cc = 'Coco-Chanel Form Response!'; $BoDy = ' '; $FrOm = 'FROM:' .$_POST['t1']; $FrOm .= 'Reply-To:' .$_POST['t1']; $FrOm .= 'X-MAILER: PHP'.phpversion(); $BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Name: </b></font>'; $BoDy .= $_POST['t1']; $BoDy .= "\n"; $BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Email: </b></font>'; $BoDy .= $_POST['t2']; $BoDy .= "\n"; $BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Comments:</b></font> '; $BoDy .= $_POST['t3']; $BoDy .= "\n"; $send = mail("$mymail", "$cc", "$BoDy", "$FrOm"); ///Redirect user to your homepage.... if($send) { echo ' <p>'; echo ''; echo ' <p><font face="Verdana" size="1" color="#FF82A5"><b>Sent, redirecting!</b></font>'; echo ' <p>'; } ?> </font> </body> </p> </html> This is the code which sort of processes the form. As you can see, I have inserted formatting on the sections entitled Name:, Email:, and Message:. When I open the email, it comes up as this. Name: # Email: # Message: # The words name email and message are all in the font I choose. But after that (the bit the sender of the form types), is all in Times new Roman. Is there any way I can get the same font running through the email I recieve? Possibly css or php? It might help if you visit my site. www.coco-chanel.co.uk/contact.htm Cheers, Seth x Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted March 8, 2008 Share Posted March 8, 2008 leave your font tag open until after all text is out. $BoDy .= '<font face="Verdana" size="1" color="#FF82A5"><b>Name: </b>'; $BoDy .= $_POST['t1']; $BoDy .= "\n"; $BoDy .= '<b>Email: </b>'; $BoDy .= $_POST['t2']; $BoDy .= "\n"; $BoDy .= '<b>Comments:</b> '; $BoDy .= $_POST['t3']; $BoDy .= "</font>\n"; Quote Link to comment Share on other sites More sharing options...
Sethers Posted March 8, 2008 Author Share Posted March 8, 2008 Fantastic, thankyou very much! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.