Hello, ok so i have my website and each page has a header.php include... What i want top do is a small line of code that will MAke the page Display "This website is currently under maintainece" When a box is checked and submitted by another script Any ideas how this can be done...... could some 1 whip up a script or point me in the right direction i would be very greatful : Cheers guys!
You could have the checkbox update a field in the MySQL database and the header file check it to see if it is enabled or not then display the relevant content: <?php $query = mysql_query("SELECT `maintenanceOn` FROM `settings` LIMIT 1") or die(mysql_query()); list($maintenanceOn) = mysql_fetch_assoc($query) or die(mysql_query()); if ($mainenanceOn === 1) { echo "This website is currently under maintenance"; } else { // not under maintenance. Do something or remove the else {} portion } ?> PHP: