url info php code example
Example 1: if browser url is having query string after domain name in it check using php
$url = $_SERVER['REQUEST_URI'];
if (!strpos($url,'mysql')) {
echo 'No mysql.'; //swapped with other echo statement
} else {
echo 'Mysql exists.';
}
Example 2: how to fetch data from url in php properly
Add action="<?php $_SERVER['REQUEST_URI']; ?>" if you dont know just copy and paste it