Open different pages on doing login
<p>I have four pages that would be displayed on when user gets login otherwise a popup is displayed please login and login page gets opened. When user enters username and password only 1st page gets opened every time. I want to open 3rd page. Please tell me a way to open every separate page when user logs in... like </p>

<pre><code>&lt;?php
$con = mysql_connect("localhost","root","");
$db = mysql_select_db('fyp',$con);

if(isset($_POST['login']))
{
$user_name = $_SESSION['user_name'] = $_POST['user_name'];
$user_pass = $_POST['user_pass'];


$query = "select * from user_login where user_name='".$user_name."' AND user_pass='".$user_pass."'";
$run = mysql_query($query);
if(mysql_num_rows($run)&gt;0){

echo "&lt;script&gt;window.open('register_event.php?logged=logged in Successfully..!!!','_self')&lt;/script&gt;";   // it is the page 1
echo "&lt;script&gt;window.open('register_executive.php?logged=logged in Successfully..!!!','_self')&lt;/script&gt;"; // it is page 2
}
else{
    echo "&lt;script&gt;alert('password or user name is incorrect!')&lt;/script&gt;";
}
}

?&gt;
</code></pre>