Session variable Error
<p>I'm not getting value to the session variable. Please have a look at the following code. </p>

<pre><code>&lt;?php
session_start();
$uname=$_SESSION['uname'];
include("connection.php");
$qtno=$_POST['qtno'];
$uans=$_POST['answer'];
$query_qt=mysql_query("SELECT * FROM answr WHERE No='$qtno' ");
$info = mysql_fetch_array($query_qt);
if($info)
{
    $ans=$info['Answer'];   
}

if($ans==$uans)
{
    $query_ap=mysql_query("UPDATE regst SET points=points+1 WHERE unme='$uname'");
    $query_sel=mysql_query("SELECT * FROM regst WHERE uname='$uname'");
    $infor = mysql_fetch_array($query_sel);
    if($infor)
    {
        $_SESSION['pid']=$infor['points'];
    }
    header("location:account.php");
}
else
{
    echo "FALSE";
}
?&gt;
</code></pre>

<p>The session variable <code>$_SESSION['pid']</code> does not hold any value. Actually it should contain the value of the column <code>points</code> after increasing it's value. </p>
