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); Quote 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 (edited) 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. Edited October 16, 2012 by requinix Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/269510-properly-format-tag/#findComment-1385700 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.