I have a custom page to run a search. If the search fails, I would like an Alert box to popup informing the user.
On my custom search page, I have it set a $_SESSION variable with the appropriate error message.
I am trying to write some code on the tbl_main_page.php page to display my message.
I've tried something like this:
but, nothing shows up.Code:<?php //CHECK FOR ERROR AND DISPLAY IT if(isset($_SESSION['badsearch'])) { $errormsg = $_SESSION['badsearch']; echo "<script>alert(\"$errormsg\"); </script>"; unset($_SESSION['badsearch']); } ?>
Anyone have any ideas how I can make this work?


Reply With Quote
