What's new

PHP How to redirect to a new php page with alert box?

Status
Not open for further replies.

KristanC

Eternal Poster
Joined
Jun 15, 2016
Posts
538
Reaction
90
Points
263
Age
24
Hello po mga kaPHC ask ko kang pano po mag display muna ng alert box tas pag click OK mag redirect sa new php page

Yung redirect po na tinutukoy ko is

Code:
header("location:index.php");
 
echo "<script>
alert('You are now redirecting to new page!');
window.location.href='index.php';
</script>";
 
<button type="button" class="button" onclick="redirect()">Go to</button>
</div>
<script>
function redirect() {
alert("You are now redirecting..");
window.location.href="You do not have permission to view the full content of this post. Log in or register now.", '_blank';
}
</script>
 
Status
Not open for further replies.

Similar threads

Back
Top