Displaying individual records in pageBy clicking the hyper link the address bar will carry the student id to details.php page to use inside our query. But before using this student id we have to sanitize this data as it can be changed to carry out injection attack. There are different ways to do this but we will check if the data is numeric or not and exit the page execution if we found non-numeric value is stored in id variable. Here is the code to this part.
$id=$_GET['id']; // Collecting data from query string
Now we can use this id value inside our query.
Number of User Comments : 4
|PHP MySQL Data Display|
PHP functions to execute query to manage database, tables & records|
PHP MySql Data Display
Displaying details of record on click by user
Displaying record details with edit option
Displaying one record in a page with all details
Displaying records without repetitions of same field data
PHP Paging or breaking records per page
I was banging my head for more than 2 weeks on how to accomplish this task. Thanks for sharing. Well explained.
I would like to go 1 step further. How can I get the database result opens in a new page.
|Simple and Good.|
|Hey man I was looking for this, you have safe my life, thank you very much...|
|Hi how can I fix the problem with Notice: Undefined index: id.|
I have tested with $id = isset($_GET['id']) ? $_GET['id'] : ''; but send a Data Error; but everything is OK what am I doing wrong?