以下の現在の状態で true の場合、ユーザーが mail.php に送り返され、両方が正しく機能するこの php セクションがあり$mailErrorMsg
ます$mailErrorDisplay
。
phpのオリジナル
if ($sql_recipient_num == 0){
$mailErrorMsg = '<u>ERROR:</u><br />The Recipient does not exist.<br />';
$mailErrorDisplay = '';
}
そして変更するcss部分
#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";?>;
}
ただし、この行を追加しheader('Location: mail.php?tid=3');
て、エラーが発生したタブをユーザーが見ていることを確認できるようにすると、上記の変数はいずれも実行されないため、エラーは表示されません。使用できる header:location の他の形式はありますか?
if ($sql_recipient_num == 0){
header('Location: mail.php?tid=3');
$mailErrorMsg = '<u>ERROR:</u><br />The Recipient does not exist.<br />';
$mailErrorDisplay = '';
}