title: session variable sets on one page and find empty on another page
body: <p>Hello Friends I am new at forum
  I have create a simple login page name as <strong>index.php</strong> with following code:</p>
  
  <pre><code>// I have already starts session by session_start()
  $qry="select empCode from relaxo_employee_info where empCode='".$username."' and empPassword='".$password."' and empPost='Executive'";
  $result=mysql_query($qry);
  if($row=mysql_fetch_array($result))
  {
      $_SESSION['UID']=$username;
      echo $_SESSION['UID'];              //prints session data successfully so think session set correctly. 
  ?&gt;
      &lt;script&gt;self.location.href='executive/order_place.php';&lt;/script&gt;
  &lt;?php               
  }
  </code></pre>
  
  <p>then at starting of <strong>order_place.php</strong> I continue the session by <strong>session_start()</strong> and the following code in it to check valid session</p>
  
  <pre><code>    &lt;?php
                session_start();
                if(isset($_SESSION['UID'])==NULL)   // at this point $_SESSION['UID'] find automatically empty. somehow Its blank completely.
                { 
      ?&gt;
      &lt;script&gt;self.location.href='index.php';&lt;/script&gt;  //because of session finds empty it redirects to index.php
      &lt;?php
                }
      ?&gt;
  </code></pre>
  
  <p>and strange things are happens I just share with u which helps you understand my problem</p>
  
  <p>1) the same code is run on localhost successfully and does not work on my domain
  2) sometimes session works successfully but sometimes not with same code without any changes</p>
  
  <p>So guys please solve my problem and help me to come out from this issue</p>