Blank page until its loaded

Put this near the top of the head section <!– CAUSE PAGE TO FADE IN ONCE LOADED – 1ST PART –> <style> body { display: none; } </style> <!– LOAD JQUERY LIBRARIES –> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> <!–Should be first script imported/first script on the page–> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/smoothness/jquery-ui.css" type="text/css" media="all" /> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/jquery-ui.min.js" type="text/javascript"></script> Put […]

Read More

Do not cache page

  <?php //SET PAGE TO NOT BE CACHED header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1. header("Pragma: no-cache"); // HTTP 1.0. header("Expires: 0"); // Proxies    

Read More

Reload page

Reload the current page Reload current page but with post values stripped Using javascript Periodic Refresh

Read More

Getting URL Arguments

Example GET URL http://www.somedomain.com/somedir/somepage.php?name_a=value_a&name_b=value_b&name_c=value_c Start with an '?', then separate other values with an '&' To read: if (!empty($_REQUEST[‘redirect_to’])) //Note that a value of zero will cause empty() to be true if (isset($_REQUEST[“source”])) //A value of zero will still give isset() being true so this is often the better choice then empty() echo $_REQUEST[“name_a”] . "<br/>"; […]

Read More

Redirect and Reload

Before outputting page content Note this must be before any html headers are sent (i.e. in php code before html output) Redirect to a new page Reload the current page The php header function If you’ve outputted some page content Using a META tag is the easiest way

Read More

Close Browser Window

PHP is executed at the server-side and thus does not know about clients, browsers or windows of those browsers. Some options though: Close button <?php echo “<BUTTON onclick=\”window.close();\”>CLOSE</BUTTON>”; ?> Close using java script <script language=JavaScript> window.close(); </script>

Read More