Jump to content

Passing html div classes in php mail form


hatefulcrawdad

Recommended Posts

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.