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
Please help me
Moderator: General Moderators
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
This should be in client side.
You need to echo out the javascript to pop up the window.
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");
}
?>- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK