<?php
$tname=$_POST['tname'];
$uname=$_SESSION['user'];
include('db_connect.php');
$sql="SELECT marks FROM marks WHERE uname='$uname' && tname='$tname'";
$data=mysql_query($sql);
$marks=$data['marks'];
echo $marks;
echo $uname;
echo $tname;
?>
When I am trying to retrieve data marks is not retrived its displaying as "Marks" Please help