javascript - Heading to another page in PHP -
i curious know if there way using javascript make php go page ?
because head works when first function called, resorted javascript go page. php must have similar function no ?
<?php session_start(); session_destroy(); echo '<script language="javascript"> <!-- window.location="home.php"; //--> </script>'; ?>
you have mistake.
header('location: some_location.php');
needs first things that's being output, meaning, if echo before this, wont work, other wise work.
so just:
header('location: some_location.php');
Comments
Post a Comment