Seeing that you seem to only be coding in hard values in your URL, you can add PHP tags to the url with a GET array.
Here is an example:
<?php
$_GET['clt_user'] = "john";
$clt_user = $_GET['clt_user'];
?>
<a href="http://swaba.gaming.multiplay.co.uk/adcookie.html?user=1603&gm=minecraft&clt_user=<?php echo htmlspecialchars($clt_user); ?>&srv_id=4332">Link</a>
<h2>Thanks</h2>
<h2><?php echo htmlspecialchars($clt_user); ?></h2>
<h2>for watching our advert!</h2>
HTML source:
<a href="http://swaba.gaming.multiplay.co.uk/adcookie.html?user=1603&gm=minecraft&clt_user=john&srv_id=4332">Link</a>
<h2>Thanks</h2>
<h2>john</h2>
<h2>for watching our advert!</h2>
However, you don't need (or may not need) all those extra tags. You can use it all in one line if desired.
<h2>Thanks
<?php echo htmlspecialchars($clt_user); ?> for watching our advert!
</h2>
Edit:
There is something I have noticed though, you are using adcookie.html
with .html
as your file's extension. You would need to use a .php
extension or instruct Apache your system to treat .html
files as PHP if it isn't supported.
.html
files by default, will not parse PHP directives.
That is why it's not working for you now, as you stated in comments.
Consult the following if you want to continue using .html
as your preferred file extension.
So your URL link's page will contain something to the effect of, and using a .php
file extension:
<?php
$_GET['clt_user'] = "john"; // this will depend on where that is being fetched from
// this is only an example
$clt_user = $_GET['clt_user'];
?>
<a href="http://swaba.gaming.multiplay.co.uk/adcookie.php?user=1603&gm=minecraft&clt_user=<?php echo htmlspecialchars($clt_user); ?>&srv_id=4332">Link</a>
Then your adcookie.php file will contain:
<?php
$clt_user = $_GET['clt_user'];
?>
<!DOCTYPE html>
<head></head>
<title></title>
<body>
<h2>Thanks
<?php echo htmlspecialchars($clt_user); ?> for watching our advert!
</h2>
</body>
</html>