If you don't like using header() as I like to redirect page mid-page. This is implemented using
Javascript written through PHP function. Has a die() function at the end for people who has
disabled their Javascript in their browser.
Javascript written through PHP function. Has a die() function at the end for people who has
disabled their Javascript in their browser.
<?php
function redirect( $new_location ){ |
echo ("<script type= 'text/javascript' > |
document.location.replace( '$new_location' ); |
</script> "); |
die (); |
} |
?>
No comments:
Post a Comment