What is query string in PHP
In : IMCA Subject : Web Development Using PHPA query string is the part of a URL that comes after the question mark (?) . It is used to pass extra information from one page to another, usually to help customize or filter content on the server side.
if https://example.com/welcome.php?name=John is url where ?name=John is query string
Example :
<?php
if (isset($_GET['name'])) {
echo "Hello, " . $_GET['name'];
}
?>
When Are Query Strings Used?
To filter data (like search results)
To pass small amounts of data between pages
For tracking links (e.g., campaign IDs in marketing URLs)
Building dynamic pages based on user input or choices