Porkie Posted February 23, 2009 Share Posted February 23, 2009 iam creating a contact form and have a drop down menu which has Priorities "High,Medium,Low" if High priority is selected when submitted to my email address and i open the message i want the font to be red how could i do this? cheers in advance Link to comment https://forums.phpfreaks.com/topic/146601-changing-colour-of-text/ Share on other sites More sharing options...
The Little Guy Posted February 23, 2009 Share Posted February 23, 2009 switch($_POST['priority']){ case 'high';$c = 'red';break; case 'medium';$c = 'yellow';break; case 'low';$c = 'green';break; } echo 'This is a <span style="color:'.$c.'">'.$_POST['priority'].'<span> item'; Link to comment https://forums.phpfreaks.com/topic/146601-changing-colour-of-text/#findComment-769602 Share on other sites More sharing options...
npsari Posted February 23, 2009 Share Posted February 23, 2009 You mean you want the font to be red in your email? If this is what you mean... You will have to send the message as a rich HTML one, not a normal text one Just google sending HTML messages in PHP Link to comment https://forums.phpfreaks.com/topic/146601-changing-colour-of-text/#findComment-769617 Share on other sites More sharing options...
The Little Guy Posted February 23, 2009 Share Posted February 23, 2009 You mean you want the font to be red in your email? If this is what you mean... You will have to send the message as a rich HTML one, not a normal text one Just google sending HTML messages in PHP Or look at the last example in the manual... http://us.php.net/manual/en/function.mail.php Link to comment https://forums.phpfreaks.com/topic/146601-changing-colour-of-text/#findComment-769632 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.