Alright, so I'm going to be completely honest here. I've spent three days trying to find what was going wrong, used online sources to check for errors, ANYTHING, that I could use to help me fix this problem. The original PHP code I used is below, but I've changed it a bit, and I'll show those as well:
<?php
$image = $_GET["image"]; //e.g. "image.png"
echo '<img src="' . $image . '"/>'; //prints everything after ">" (unwanted)
echo '<a href="' . $image . '">Right-click to download</a>';
?>
After seeing that caused the problem, I tried swapping the quotes:
<?php
$image = $_GET["image"]; //e.g. "image.png"
echo "<img src='" . $image . "'/>"; //still cuts off
echo "<a href='" . $image . "'>Right-click to download</a>";
?>
Then after THAT, I tried taking the original code and made echo use a variable:
<?php
$image = $_GET["image"]; //e.g. "image.png"
$imgech = '<img src="' . $image . '"/>';
$aech = '<a href="' . $image . '">Right-click to download</a>';
echo $imgech;
echo $aech;
?>
Then I tried swapping the quotes again (You can see above, I don't want to make this too long). I tried using brackets:
<?php
$image = $_GET["image"];
echo "<img src='{$image}'/>";
echo "<a href='{$image}'>Right-click to download</a>";
?>
...I however didn't try swapping the quotes this time. I've tried more combinations, but I don't want to make this too long, so I'll skip over those. Using online tools, I've found no errors in the code, the file ends in .php, and the HTML is normal:
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>View image</title>
<link rel="stylesheet" href="default.css"/>
</head>
<body>
<!-- PHP code goes here -->
</body>
</html>
So I have no idea what's wrong! Other questions I've found are mostly just HTML or file problems, and references show me I'm doing things right. Could someone please help me?