I have this php section that if is true in the current state below the user gets sent back to mail.php and both $mailErrorMsg and $mailErrorDisplay work correctly.
The php original
if ($sql_recipient_num == 0){
$mailErrorMsg = '<u>ERROR:</u><br />The Recipient does not exist.<br />';
$mailErrorDisplay = '';
}
And the css part that changes
#mail_errors {
height: 30px;
width: 767px;
text-align: center;
color: #666666;
font-family: Verdana, Geneva, sans-serif;
font-size: 9px;
clear: both;
font-weight: bold;
<?php print "$mailErrorDisplay";?>
background-color: #FFF;
border: thin solid <?php print "$mail_color";?>;
}
However if I add this line header('Location: mail.php?tid=3'); which allows me to make sure the user is looking at the tab the error is in, none of the variables listed above take place and therefore the error does not show. Is there any other form of header:location I can use?
if ($sql_recipient_num == 0){
header('Location: mail.php?tid=3');
$mailErrorMsg = '<u>ERROR:</u><br />The Recipient does not exist.<br />';
$mailErrorDisplay = '';
}