I have tested everything and nothing works here's my code
<?php
session_start();
if (!isset($_GET['id']) || !is_numeric($_GET['id'])) { die('Invalid id'); }
$conn = mysqli_connect("redacted", "redacted", "redacted", "redacted");
if (!$conn) {
die("Connection failed: ".mysqli_connect_error());
}
$url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
$id = (int)$_GET['id'];
"UPDATE affiliate SET clicks WHERE ID='$id' = clicks + 1";
header("Location: https://discord.gg/CjzZRBq");
?>
and after I want it to echo on the users dashboard this is what I have
<h1>Clicks</h1>
<br />
<br />
You have gotten: <?php $conn = mysqli_connect("localhost",
"id2278622_jonny", "Fencing1", "id2278622_affiliate");
if (!$conn) {
die("Connection failed: ".mysqli_connect_error());
}
$sql = "SELECT clicks FROM affiliate WHERE ID='$ID'";
echo "$sql";
?> Clicks!
but it just echos the sql code