tags:

views:

48

answers:

3

i am trying to develop a website and i want that after entering correct username and password desired page should open. how i can achieve this.

+2  A: 
if(...)
{
    // code to verify login...
    header("Location: http://page_to_forward_to/");
}
else { ... }

Hope this is what you are looking for

adam
A: 

you can use the header fuction:

 header("location: www.example.com/yourpage.php");

Other possibility is to use javascript:

<script>
  window.location = 'yourpage.php';
</script>
Sarfraz
+1  A: 
$url = "my/url/here";
Header("Location: $url");
exit();
Phil Wallach
+1 for `exit()` after `header()`.
chelmertz