Im a newbie in html and php, and a sample code is given below
<?php
$username = $_GET['username'];
$password = $_GET['password'];
if ($username == 'admin' && $password == 'admin'){
// open a new page.
I WANT A NEW PAGE TO OPEN UP ON THE LOGIN PAGE IF THE USERNAME = admin and PASSWORD = admin ????
}
?>
thanks.
question about opening a new page within an if statement
Moderator: General Moderators
- ambivalent
- Forum Contributor
- Posts: 173
- Joined: Thu Apr 14, 2005 8:58 pm
- Location: Toronto, ON
Re: question about opening a new page within an if statement
header() is what you're looking for.
Re: question about opening a new page within an if statement
well i did some research and found that javascript is better for opening windows at client side//
<script language="javascript">
<!--
window.open('newpage.html', 'example', config='height=400,width=400')
-->
</script>
<script language="javascript">
<!--
window.open('newpage.html', 'example', config='height=400,width=400')
-->
</script>