Page 1 of 1

pop up window for success or failur

Posted: Thu Jan 15, 2009 9:09 pm
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)

Re: pop up window for success or failur

Posted: Thu Jan 15, 2009 9:56 pm
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>";
}
}