Page 1 of 1

Please help me

Posted: Sat Apr 03, 2004 5:50 pm
by NighTCrawLa
i have a password protect code


<?php
if ($_POST['pass'] == "123456") {
include ("membersonly.php");
}
else {
header("Location:error.html");
}
?>


and i want the membersonly.php to pop up

Posted: Sat Apr 03, 2004 6:35 pm
by d3ad1ysp0rk
This should be in client side.

You need to echo out the javascript to pop up the window.

Code: Select all

<?php
if($_POST['pass']=="123456"){
echo <<<EOT
<script language="javascript">
window.open("yoursite.com", "", "fullscreen=no,toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,directories=yes,location=yes,width=500,height=387");
</script>
EOT;
}
else {
header("Location:error.html");
}
?>

Posted: Mon Apr 05, 2004 3:49 am
by twigletmac
Moved to Clientside.

Mac