Query String
Step 1: Download [Link] file and save it in htdocs under Xampp
Step 2: Copy the following script ([Link]) and run it in Xampp Shell
CREATE DATABASE library;
USE library;
--
-- Table structure for table `book`
--
CREATE TABLE `book` (
`bookid` bigint(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`title` varchar(40) DEFAULT NULL,
`author` varchar(40) DEFAULT NULL,
`genre` varchar(30) DEFAULT NULL,
`published` year(4) DEFAULT NULL,
`description` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
Step 3: Run your Library project
Click on the link generated for title to know the description of the Book
This URL includes Query String
To search the books written by a particular author click on link generated under author
This URL includes Query String
A query string is a part of a uniform resource locator that assigns values to specified parameters.
A query string commonly includes fields added to a base URL by a Web browser or other client
application, for example as part of an HTML form. Wikipedia
Step 4: we have following files in Library folder
[Link]
New_book.php Process_new_book
[Link] [Link]
[Link] [Link]
a) New_Book.php is a form to add new books in Library database created by the above script
b) [Link] will display all the details entered in the database with a hyperlink under the title
of the [Link] a user wants to know details of a particular book ,they can click on the title of
the book .
c) [Link] will display all the details entered in the database with a hyperlink under the
author of the [Link] a user wants to know all the books written by this particular Author ,
they can click on the Author of the book .
d) As shown in the above diagram that Process_new_book ,[Link],[Link] are the
supporting scripts.
e) Supporting scripts depends on the actions of users like Process_new _Book will work
automatically if user click submit button to add new book.
f) [Link] will work automatically on the basis of particular value passed by user in
[Link]
g) [Link] will work automatically on the basis of particular value passed by user in
[Link]