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

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

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


in the details.php page:

   $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 learning and sharing knowledge.