<?php
require("Dbconnect.php");
//echo "<table id='t1'>";
$cls=$_GET['class'];
//$count=0;
echo $cls;
$qry ="select cls_section_id from class where Class_name='$cls' ";
$result=mysql_query($qry);
while($row=mysql_fetch_array($result))
{
echo $row['cls_section_id'];
}
?>
http://localhost/ediary/school%20%20diary%20system/subjectassign.php?class=%20NURSERY-A
therefore $cls has value=NURSERY-A and when i am querying it does not result anything and instead of $cls if i use 'NURSERY-A' directly then output is required output,can anyone tell me is there is any error