Answers for "when user clicks button shows datbase value with that id php"

PHP
0

when user clicks button shows datbase value with that id php

<?Php
require "config.php"; // database connection details 
$str=$_GET['str']; // collect the student id

$count=$dbo->prepare("select * from student where id=:id");
$count->bindParam(":id",$str,PDO::PARAM_INT,3);

if($count->execute()){
$row = $count->fetch(PDO::FETCH_OBJ);
echo "id: ".$row->id.", Name: ".$row->name." , Mark : ",$row->mark;
}else{
echo "Database Problem ";
}

?>
Posted by: Guest on November-25-2020

Code answers related to "when user clicks button shows datbase value with that id php"

Browse Popular Code Answers by Language