pop up window for success or failur

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mit
Forum Commoner
Posts: 32
Joined: Mon Sep 15, 2008 6:37 am

pop up window for success or failur

Post by mit »

the situation is like this,
after user submit the form in the same page,if user successfully register success page (sucssess.php)will pop up and if can not register failur page (failure.php)must pop up.

there is only 1 submit bottom which user can press (submit)
silenceghost
Forum Newbie
Posts: 22
Joined: Sun Oct 19, 2008 3:25 am

Re: pop up window for success or failur

Post by silenceghost »

do serverside coding

Code: Select all

 
if($_SERVER['REQUEST_METHOD']=="POST")
 if(is sucess){
   //set session here
   print "<script>window.open('sucess.php')</script>";
or print "<script>window.location='sucess.php'</script>";
 }else{
  print "<script>window.open('failure.php');</script>";
or print "<script>window.location='failure.php'</script>";
}
}
 
Post Reply