letsay we have a student table as follow
id,sname.description
And data is
1,netmastan,Doing computer science
2,matt,Doing software developent
We just want to display student information by id number. Justing using this url student.php?id=somenumber.
so,student.php has the following code
$result=mysql_query("Select id,sname,description where id=$id",$dbi) ;
$records=mysql_num_rows($result);
if ($records>0) {
list($id,$sname,$description)=mysql_fetch_array($result);
echo " student Id :$id<br>Student Name:$sname<br>Description:$description";
}
else {
echo "Sorry NO records found by Id $id";
}
Now if we use student.php?id=1 , we see detials information of student"netmastan";