How i can direct user to a specific page if user name and pa
Posted: Sat Nov 19, 2011 2:01 am
I want to direct user to courses.html if user name and password is correct and if incorrect wrong.html.
I tried this but every time even user name and password is correct or incorrect is goes to wrong.html.
Any body help me to fix this problem.
Thanks
I tried this but every time even user name and password is correct or incorrect is goes to wrong.html.
Any body help me to fix this problem.
Thanks
Code: Select all
<?php
$id="";
$pw="";
if (isset($_post['id']))
{
$id =$_post['id'];
}
if (isset($_post['pw']))
{
$pw =$_post['pw'];
}
if($id=='myid' && $pw =='mypw') {
header('Location: courses.html');
}
else {
header('Location: wrong.html');
}
?>