if(isset($_POST['submit']))
        {
            $username=$_POST['username'];
            $password = md5($_POST['pwd']);
            $query="SELECT * FROM users WHERE username='".$username."' AND pwd='".$password."'";
            $result_set = mysql_query($query);
            $num=mysql_num_rows($result_set);
            if ($num > 0) 
            {
               $found_user = mysql_fetch_array($result_set);
                $_SESSION['uid'] = $found_user['id'];
                    $_SESSION['email'] = $found_user['email'];
                    $_SESSION['username'] = $found_user['username'];
                     echo "<script type='text/javascript'>
                parent.jQuery.fancybox.close();
                location.reload();
                </script>";
            }
            else
            {
            header("location:login-register.php?error=1");
            }
        }
I am running this script inside my login page. It works perfectly in xampp localhost server but session id fails to load and work when I uploaded my folder to web-server which is using Fedora 13 with php version 5.3.5.
I have checked PHPinfo, session id is active but it is not working in the server. Please help.
 
     
     
    