webguync
-
Posts
951 -
Joined
-
Last visited
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
PHP/MySWL show image if
in PHP Coding Help
Posted
Hello,
I am displaying the results of a my SQL table in HTML via PHP, and what I want to do for the first column is display and image based information is one of the MySQL columns. The Column is named 'f15' and I want to display the image if the data in the column is equal to 1.
Here is what I have:
echo"<tr><td>" . $row['if(f15 == 1){<img src=icons/apo.gif" width="15" height="17" alt="airportindicator"> else{}}] . "</td></tr>";
and it's not working. I have the icons folder with apo.gif located on the server.
Again, I want to display the image if column f15 in the MySQL table is =1 and I want it to display with the HTML <td> syntax.