Help with syntax
Posted: Tue Sep 14, 2010 10:12 pm
I need help inserting the correct syntax to make my snippet of code work correctly. It will work when the messages are output using echo only and not wrapped in tags. Can anyone pelase help me out with inserting correct syntax as I am not familiar with it. Thanks !
Code: Select all
<?php
if(isset($hasError)) {
echo <p class="error" style="color:blue;">Error. Please check that you've filled all the fields with valid information.</p>
} elseif (isset($emailSent) && $emailSent == true) {
echo <p style="padding-bottom:4px;">Thank you <strong><?php echo $name;?></strong> for contacting us! A representative will be in contact with you in 1-2 business days. </p>;
} else {
echo <p class="error">We'll call you shortly! This information is confidential and will never be used for marketing purposes.</p>;
}
?>