| | |
Showing image
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Oct 2008
Posts: 89
Reputation:
Solved Threads: 0
I have created a database. It just contains information about websites. One column has the path to an image, like a rating system(1-5 stars). I just need to display this information on a web page. Everything shows up fine, but I just need it to display the image instead of the path to it.
Any help would be greatly appreciated!
php Syntax (Toggle Plain Text)
<?php $row_count = 0; $columns = 3; while ($row = mysql_fetch_assoc($result)) { if ($row_count == $columns) { echo "</tr><tr>"; $row_count = 0; } echo "<tr><td>"; echo $row['Site']; echo "</td><td>"; echo $row['Description']; echo "</td><td>"; echo $row['Rating']; echo "</td>"; $row_count++; } ?>
•
•
Join Date: May 2008
Posts: 94
Reputation:
Solved Threads: 15
php Syntax (Toggle Plain Text)
<?php $row_count = 0; $columns = 3; while ($row = mysql_fetch_assoc($result)) { if ($row_count == $columns) { echo "</tr><tr>"; $row_count = 0; } echo "<tr><td>"; echo $row['Site']; echo "</td><td>"; echo $row['Description']; echo "</td><td>"; echo "<img src=\"{$row['Rating']}\" alt=\"{$row['Description']}\" />"; echo "</td>"; $row_count++; } ?>
Last edited by sureronald; Jul 28th, 2009 at 4:57 am. Reason: code errors
![]() |
Similar Threads
- how to retrive image file from mysql databse using php (PHP)
- Website NOT showing menu hover in Internet Explorer (Site Layout and Usability)
- showing image on crystal report (VB.NET)
- showing image by click button (Python)
- Hover Image Position ??? (HTML and CSS)
- thx but how do i display an image in java (Java)
Other Threads in the PHP Forum
- Previous Thread: value in third text box
- Next Thread: Session gabbage cleaner
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube





