This works very well for me:
<html>
<head>
<title>Query string </title>
</head>
<body>
<?php
// The value of the variable name is found
echo "<h1>Hello " . $_GET["name"] . "</h1>";
// The value of the variable age is found
echo "<h1>You are " . $_GET["age"] . " years old </h1>";
?>
</body>
</html>
And the PHP is like this:
$_GET["name"]
$_GET["age"]
My question is, as you can see there is HTML markup in my example, just a simple H1 Tag. But - what happens if the GET parameters are not there? Then the result would be an empty H1 Tag which is not the end of the world, but I'd prefer to only show the HTML Markup IF the GET parameters are present.
Would this be possible and how would I go about it?
I guess this is the case:
if (condition)
execute statement(s) if condition is true;
else
execute statement(s) if condition is false;
So, if that's the case then IF the GET DATA is there then run the HTML?