SESSION information not carry over to next page!

Hi, i am creating a memebers only website and im not sure if i have an error in coding when connecting to the database. The php file verifies login information which it does perfectly - then redirects to the members page.

The members page connects to a table in my database and populates the page with the members profile data that is associated with the login info entered. IT IS NOT DOING THIS.
there is no data populating the page. Please look at my code below and let me know if i am missing any vital code. Thank you sooooooooo much!!!

The PHP file:


<?
session_start();

//**connection data goes in here**

$query = "SELECT * FROM prof_pass WHERE user='$puser' AND pass='$ppassword'";

$result= mysql_query($query)
or die ("unable to retrieve database info");
$nrows=mysql_num_rows($result);

if ($nrows > 0) {
$_SESSION['auth']="yes";
$_SESSION['logname']= $user;                      //<---input by user
 while ($row = mysql_fetch_array($result))
  {
extract($row);
$clientN = $clientNumber;                            //clientNumber being a field from that row on the database
$_SESSION['client']= $clientN;                      //<----data from row 
}
header("Location: http://ragemultimedia.com/provican/code/PROF_PROFILE_TEST.php");
exit;
}
else 
{
header("Location: http://ragemultimedia.com/provican/login_error.html");
exit;

}
?>

Now for the members page: PROF_PROFILE_TEST.php …


<?
session_start();
if (@$_SESSION['auth']!="yes")
{
header("Location: ../account_login.html");
exit();
}

//**connection data goes in here**

$query = "SELECT * FROM Proffesional_list WHERE clientNumber='$clientN'";  //<---is this not the session variable ?

$result= mysql_query($query)
or DIE("unable to retrieve database info");

  while ($row = mysql_fetch_array($result))
  {
          extract($row);
    echo "<div width='98%'>
    <table width='45%' style='float:left' class='topprofiletable'>
    <tr><td><span class='busname'>$business: </span>&nbsp;&nbsp;&nbsp; ID: 1234567890 </td></tr>
    <tr><td>$streetAddress, $city, $province, $postalc</td></tr>
    <tr><td><b><font color='0000ff'>$salut1 $firstName1 $lastName1</font><b></td></tr>
    <tr><td style='float:left' class='item'>Industry:</td><td style='float:right'>$industry</td></tr>
    <tr><td style='float:left' class='item'>Contact:</td><td style='float:right'>$contactNumber</td></tr>
    <tr><td style='float:left' class='item'>Email:</td><td style='float:right'>$eMail1</td></tr>
    <tr><td style='float:left' class='item'>Fax:</td><td style='float:right'>$fax</td></tr>
    <tr><td style='float:left' class='item'>Website:</td><td style='float:right'>$webAddress</td></tr>
    <tr><td style='float:left'>&nbsp;</td></tr>
    </table>
}
?>

In the code for the login page, you assign the value of $clientN to the $_SESSION variable, but then on the members page, you refer to the $clientN variable without having re-assigned the value of the $_SESSION variable back to it.

Once you change pages, the $clientN variable loses its value, so when you use it in the SQL query, it is empty. You need to either use the $_SESSION[‘client’] variable in the sql query or you need to assign the value of the $_SESSION variable back to the local variable.