How can I make a system where I provide a userID
as a GET variable and output an image that can be returned?
Eg. I give ID as http://ccvg.net/man/findstatus.php?id=2
I have some images already created, and I currently deliver the images using
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
if($row["Status"] == 0){
echo '<img src="img/currently-available.png" alt="Currently Available" height="30" width="127">';
}
if($row["Status"] == 1){
echo '<img src="img/short-leave.png" alt="Short Leave" height="30" width="89">';
}
if($row["Status"] == 2){
echo '<img src="img/long-leave.png" alt="Long Leave" height="30" width="89">';
}
if($row["Status"] == 3){
echo '<img src="img/semi-permanent-leave.png" alt="Semi-Permanent Leave" height="30" width="160">';
}
}
} else {
echo "Status not found";
}
I want to be able to use a <img>
tag to bring it up on another page.