I think I’m doing this wrong but this is what I have…
if($_GET['color']) {
$color = "signature_";
echo "<img src=\"/images/+ $color \"; \"class=\"border\" alt=\"\" />";
What I’m trying to do is output the colored image based on the users input.
So say this is what I am doing.
Http://somedomain.com/index.php?username=Ultima&color=red.
So far I am displacing usernames properly, but images are not working.
I used “signature_” as a prefix because the image colors are all prefixed with that.
The images I’m trying to display upon input:
signature_red.png
signature_green.png
signature_white.png
signature_yellow.png
signature_gold.png
signature_silver.png
signature_purple.png
signature_pink.png
__
I’m not sure what I’m doing wrong with my code… but does anyone know how I could display the proper images upon url input using $get['color']?
Or something like that. You have to replace the “etc…” part.
Never put GET params into string without some check.