1<?Php
2require "config.php"; // database connection details
3$str=$_GET['str']; // collect the student id
4
5$count=$dbo->prepare("select * from student where id=:id");
6$count->bindParam(":id",$str,PDO::PARAM_INT,3);
7
8if($count->execute()){
9$row = $count->fetch(PDO::FETCH_OBJ);
10echo "id: ".$row->id.", Name: ".$row->name." , Mark : ",$row->mark;
11}else{
12echo "Database Problem ";
13}
14
15?>
16