I have a table call subject, having a field subject_name. Here I want to match subject_name with a value, which I have get from global GET
.
Below shown is the code that I have tried. Here I have get list value from another page.
global $list;
if(isset($_GET['U']))
{
$list=$_GET['U'];
}
Now for subject_name
I have tried below code.
$subject=mysql_query('SELECT * FROM subject');
while($row=mysql_fetch_array($subject))
if($list==$row["subject_name"])
{
//execute this
}
Here how can I match $list value with subject_name
list?