Re-Direct A Page
syntax: header ("location: http://" . $_SERVER['HTTP_HOST'] . dirname( $_SERVER['PHP_SELF']) . "/newpage.php");
A more flexible method is to make use of the $_SERVER superglobal and the dirname() function (which returns the directory path of the current script). This will effectively redirect the user to the current domain, current directory, and the current new page to be displayed on the browser. Oh, You need to add the exit() statement after the redirect statement to terminate the current script. If omitted may result to unexpected problems. |

