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 = '[email protected]'; $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 Link to comment https://forums.phpfreaks.com/topic/95077-help-with-php-form/ 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"; Link to comment https://forums.phpfreaks.com/topic/95077-help-with-php-form/#findComment-487031 Share on other sites More sharing options...
Sethers Posted March 8, 2008 Author Share Posted March 8, 2008 Fantastic, thankyou very much! Link to comment https://forums.phpfreaks.com/topic/95077-help-with-php-form/#findComment-487032 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.