Hi,
I would like to have a page do two things.
First would be to open a second page in a small window. Perhaps using script. Second, wait a few seconds until a given session variable is in ( or not ).
Without testing it, this is what I came up with thinking it would work:
<html><head></head>
<body>
<?php
echo "<script>window.open('login.php','Login','toolbar=no,location=no,directories=no,status=no,menubar=no, scrollbars=no,".
"resizable=yes,width=300,height=125,left=100,top=50')</script>";
?>
Waiting for login...
<?
$i = 30;
while( $i > 0 ){
sleep( 5 );
if( isset( $SESSION['current customer'] ) )
echo '<script>window.location="index.php"</script>';
$i -= 5;
}
echo "<br><br><br><center>Login was not successful.</center>";
sleep( 10 );
echo '<script>window.location="index.php"</script>';
?>
</body>
</html>
However, all this does is wait, and then when it redirects it opens the page in a little window. How do I get it to respect order of operations?
Thanks
Alex