cmb Posted October 16, 2012 Share Posted October 16, 2012 So im useing the phpmailer class. The html message sends correctly when i have the html hardcoded into the php like this $mail->MsgHTML('<html> <body style="background-color: #000;"> <table> <tr> <td id="pinkpanthers" style="border: 2px solid #393;padding: 40px 40px; width: 100px;border-radius: 25px; color: #000; background-color: #393;font-size: x-large;" style="border: 2px solid #393;padding: 40px 40px; width: 100px;border-radius: 25px; color: #000; background-color: #393;font-size: x-large;"><a href="http://www.photosbychristian.com/pinkpanthers/index.php" style="text-decoration:none;color: #fff;">Pink<br />Panthers</a></td> <td id="gbsa" style="border: 2px solid #393;padding: 40px 40px; width: 100px;border-radius: 25px; color: #000; background-color: #393;font-size: x-large;"><a href="http://www.photosbychristian.com/gbsa/index.php" style="text-decoration:none;color: #fff;">GBSA</a></td> <td id="elite" style="border: 2px solid #393;padding: 40px 40px; width: 100px;border-radius: 25px; color: #000; background-color: #393;font-size: x-large;"><a href="http://www.photosbychristian.com/elite/index.php" style="text-decoration:none;color: #fff;">Elite</a></td> <td id="THS" style="border: 2px solid #393;padding: 40px 40px; width: 100px;border-radius: 25px; color: #000; background-color: #393;font-size: x-large;"><a href="http://www.photosbychristian.com/THS/index.php" style="text-decoration:none;color: #fff;">THS</a></td> <td id="HDR" style="border: 2px solid #393;padding: 40px 40px; width: 100px;border-radius: 25px; color: #000; background-color: #393;font-size: x-large;"><a href="#" style="text-decoration:none;color: #fff;">HDR</a></td> <td id="family" style="border: 2px solid #393;padding: 40px 40px; width: 100px;border-radius: 25px; color: #000; background-color: #393;font-size: x-large;"><a href="#" style="text-decoration:none;color: #fff;">Family</a></td> </tr> <tr> <td colspan="6"> <p style="color: #fff; text-align:center;">Text will go here</p> </td> </tr> </table> </body> </html>'); but when i try and get it to post from a form, using the below code, it doesn't send correctly (the css and links don't work) $htmlmsg = $_REQUEST['htmlmsg']; $html = "'".$htmlmsg."'"; $mail->MsgHTML($html); Link to comment https://forums.phpfreaks.com/topic/269510-properly-format-tag/ Share on other sites More sharing options...
requinix Posted October 16, 2012 Share Posted October 16, 2012 Do you have the magic_quotes_gpc php.ini setting enabled? Use phpinfo if you're not sure. If you have it enabled then disable it. Link to comment https://forums.phpfreaks.com/topic/269510-properly-format-tag/#findComment-1385438 Share on other sites More sharing options...
cmb Posted October 17, 2012 Author Share Posted October 17, 2012 That was it thanks Link to comment https://forums.phpfreaks.com/topic/269510-properly-format-tag/#findComment-1385700 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.