if(($row["status"])!="valid")
{
$stats=$row["status"];
echo "<script type='text/javascript'>";
echo "alert('Your Status is $stats..Please Try Again Later...');";
echo "</script>";
header ("location: index.php");
}
これは、php コードの一部です。ヘッダーの前に // を使用すると、javascript が実行されます。ただし、 // を使用しない場合は、直接 index.php に移動します。解決策は何ですか?? または、このif条件からメッセージを表示するためにjavascript関数を呼び出す方法はありますか??