Hi everyone, I have a web application developed using php. I want to add a new feature in it. When the user searches for some book details, all the book details are displayed. Now when the user clicks on a book name in the search results, He will be redirected to another webpage , where user can Update details of the book choosen from the previous page. Now my question is, when user links on a specific book name How can I store it in a variable , so that it will be used to query database?

Member Avatar for diafol

$_GET variable from a url parameter in the querystring,e.g.

<a href="details.php?book_id=126473920">Under Milk Wood</a>

then

in the details.php page:

if(isset($_GET['book_id'])){
   $book_id = $_GET['book_id'];
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.