shadiadiph Posted November 29, 2008 Share Posted November 29, 2008 Hi I have been using thr following script for ages now and it works ok but the output is really c*** Can anyobe think of a way I can use css so it links to a css file for output format I have tried and keep getting nothing but errors here is my script that works <? error_reporting(7); $subject = $_POST['subject']; $name = $_POST["name"]; $email = $_POST['email']; $country = $_POST["country"]; $tel = $_POST["tel"]; $message = $_POST['message']; $to = "[email protected]"; $MsgHeader = "From: Shadiadi<[email protected]>\n"; $MsgHeader .= "MIME-Version: 1.0\n"; $MsgHeader .= "Content-type: text/html; charset=iso-8859-1\n"; $MsgBody = " <html> <head> <title>HTML message</title> </head> <body> <table> <tr><td><img src='http://www.mydomain.com/pix/logo.jpg'></td></tr> <tr><td> </td></tr> <tr><td>Name : $name</td></tr> <tr><td>Email : $email</td></tr> <tr><td>Country : $country</td></tr> <tr><td>Telephone : $tel</td></tr> <tr><td>Message : $message</td></tr></table> </body> </html>"; mail($to, $subject, $MsgBody, $MsgHeader); ?> Link to comment https://forums.phpfreaks.com/topic/134795-submitformphp-css-help/ Share on other sites More sharing options...
rhodesa Posted November 29, 2008 Share Posted November 29, 2008 you can put a link to a CSS file, but some email clients don't allow it. the safest way to style HTML emails is with inline styles. Link to comment https://forums.phpfreaks.com/topic/134795-submitformphp-css-help/#findComment-701931 Share on other sites More sharing options...
shadiadiph Posted November 29, 2008 Author Share Posted November 29, 2008 i tried linking a style sheet in the traditional way [code[ <link rel="stylesheet" type="text/css" href="contact.css" /> but it doesnt work i get an error message on submit Link to comment https://forums.phpfreaks.com/topic/134795-submitformphp-css-help/#findComment-701948 Share on other sites More sharing options...
rhodesa Posted November 30, 2008 Share Posted November 30, 2008 what is the error and what is the code? Link to comment https://forums.phpfreaks.com/topic/134795-submitformphp-css-help/#findComment-702002 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.