Hi, I have a simple sql table with 2 fields. The first field is a link and in the second field I would like to have a picture (smiley face or a sad face). Should i enter the whole <img src=....... in the sql table or can I do something with my code below so that it automatically makes "1" to a happy face and "2" to a sad.
If thats possible i would like to know how i can improve my code.
Tell me if I need to be more specified.PHP Code:$result = mysql_query($query) or die ("Error in query: $query. ".mysql_error());
if (mysql_num_rows($result) > 0) {
echo "<table cellpadding=0 cellspacing=2 border=1 width=800 bgcolor=green>";
while($row = mysql_fetch_row($result)) {
echo "<tr>";
echo "<td>".$row[0]."</td>";
echo "<td>".$row[1]."</td>";
echo "</tr>";




Reply With Quote