MrFish Posted July 8, 2009 Share Posted July 8, 2009 At the beginning of every page I want it to check if I have the site down for maintenance (for future use). If it does then the page loads a "Down for Maintenance" page. If not, it loads regularly. I'm trying to get my script to read what the maintenance field in my system_status table says. It will either say true or false. But when I try and show an alert of the value, it comes up blank. mysql_select_db("b17_3648160_systemdb", $con);$query= "SELECT * FROM system_status";$run= mysql_query($query);$results = mysql_fetch_array($run);alert($results['maintenance']); It should show "false". Also, alert is a custom function which works with other text. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 8, 2009 Share Posted July 8, 2009 If it's a boolean false value, it might print an empty string instead of the string "false". Use var_dump to check it:var_dump($results['maintenance']);that will tell you both the type and value of the variable. Link to comment Share on other sites More sharing options...
MrFish Posted July 8, 2009 Author Share Posted July 8, 2009 Ok, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.