title: how to transfer data fin session of two different kind of users
body: <p>hello friends im working on a project(online auction type) and there are two different users(Buyers and sellers) and there is a small problem coming is that i cant transfer the data between two different kind of users(between buyer and seller) for eg(my actual problem):-I signed as a buyer and then i can easily go to categories(car,bikes,electronic) and then when i enter into CAR categories i can easily see the list of all the car images of all the sellers; but when i click on any of the car image i cant see the whole details of that individual seller(like on amazon when u click on any product they show u the whole detailsof one product also without losing your own session) . I have use sessions in my php.
  my code of 'login.php':-</p>
  
  <pre><code>&lt;?php
  
  
   session_start();
  
   mysql_connect("localhost","root","") or die("could not connect");
  
   mysql_select_db("form1") or die("could not connect");
  
   $Email=$_REQUEST['email'];
  
   $Password=$_REQUEST['pwd'];
  
   $role=$_REQUEST["category"];
  
   $_SESSION['un']=$Email;
  
    if($role=="Bidder")
  
  {
  
  $query="SELECT * from bidder1 WHERE email='".$Email."' and  pwd='".$Password."'"; 
  
            $mailpwd=mysql_query($query);
  
             $check=mysql_num_rows($mailpwd);
  
  if($check==1)
  {
      header("Location:buyproduct.php");
  }
  else
  {
  echo "sorry wrong id or password";}}
  
  else
  {
      $query="SELECT * from seller1 WHERE email='".$Email."' and pwd='".$Password."'";
      $mailpwd=mysql_query($query);
      $check=mysql_num_rows($mailpwd);
      if($check==1)
      {
          header("Location:welcomeseller.php");
      }
      else{
          echo "wrong id and password of seller";
      }
  
  }?&gt;
  </code></pre>
  
  <p>/*AFTER THAT I GO TO buyproduct.php */</p>
  
  <pre><code>&lt;?php
    session_start();
     mysql_connect("localhost","root","") or die("could not connect");
     mysql_select_db("form1") or die("could not connect");
  
    echo '&lt;div class="drpdown"&gt;'."welcome"."&amp;nbsp;".$_SESSION['un'].'&lt;/div&gt;';?&gt;
  </code></pre>
  
  <p><em>/AFTER THAT I SELECT ONE OF THE CATEGORY carcategory.php</em>/</p>
  
  <pre><code>&lt;?php
    session_start();
     mysql_connect("localhost","root","") or die("could not connect");
     mysql_select_db("form1") or die("could not connect");
     echo $_SESSION['un'];
     echo "&lt;br&gt;";?&gt;
  &lt;?php
  
  
       $u=$_SESSION['un'];
       $query=mysql_query("SELECT * FROM seller1 WHERE procategory='Four wheeler'");
  
     while($show=mysql_fetch_array($query))
        {
  
         $imagename=$show['proname'];
  
           $imagepath=$show['proimg'];
          $image="uploads/".$imagepath;
       echo "&lt;div style='display:inline-block;'&gt;
    &lt;a class='container' href='cardetails.php'&gt;
    &lt;img src='".$image."' height='300' width='300'&gt;
   &lt;p style='font-size:25px;text-decoration:none;margin-top:-20px;'&gt;".$imagename."&lt;/p&gt;&lt;/a&gt;&lt;/div&gt;";
  
  
     }
     ?&gt;
  </code></pre>
  
  <p>*/AFTER THAT I WANT TO GO TO cardetails.php
  what should i write in it to show whole details of a particular seller with image without losing my session */</p>