hatefulcrawdad Posted December 19, 2009 Share Posted December 19, 2009 I have the following code in my php mail form: print '<div class="email-err"><h3>Error!</h3><p>Please enter a valid email address</p></div>'; } elseif (empty($emailName)) { echo '<div class="email-err"><h3>Error!</h3><p>Please enter your name</p></div>'; } elseif (empty($emailSubject)) { echo '<div class="email-err"><h3>Error!</h3><p>Please enter a subject</p></div>'; } elseif (empty($_POST['Message'])) { echo '<div class="email-err"><h3>Error!</h3><p>Please enter a message</p></div>'; } else { if (!empty($emailFrom)) { $emailHeaders = 'FROM: <[email protected]>'; } Is that the proper way to pass divs and classes through php? I am trying to target them with css and nothing is working, so I'm guessing it is not. People have been helpful on here before, so I'm hopeful someone knows this. Link to comment https://forums.phpfreaks.com/topic/185661-passing-html-div-classes-in-php-mail-form/ Share on other sites More sharing options...
trq Posted December 19, 2009 Share Posted December 19, 2009 That would output valid html. So yeah. Where are you placing the css definitions? Link to comment https://forums.phpfreaks.com/topic/185661-passing-html-div-classes-in-php-mail-form/#findComment-980359 Share on other sites More sharing options...
hatefulcrawdad Posted December 19, 2009 Author Share Posted December 19, 2009 That would output valid html. So yeah. Where are you placing the css definitions? I am putting them in the css file attached to this page. Link to comment https://forums.phpfreaks.com/topic/185661-passing-html-div-classes-in-php-mail-form/#findComment-980360 Share on other sites More sharing options...
hatefulcrawdad Posted December 19, 2009 Author Share Posted December 19, 2009 Nevermind, I was a dummy and didn't realize where the stuff was being outputted. So I was calling the wrong id in the css. Fixed, thanks. Your comments sparked me to take a look closer. Link to comment https://forums.phpfreaks.com/topic/185661-passing-html-div-classes-in-php-mail-form/#findComment-980361 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.