Jump to content
Larry Ullman's Book Forums

Recommended Posts

I am having trouble getting this to work.  I have a table in my database which contains graphics I need to use in a table. So I want to create a query and array to populate the table.  My php is below.  Can anyone see what I'm doing wrong?

 

<?php
# feeds_user.php  This script will advertise the feeds on the index.php page (page for non members)

require_once ('../mysqli_connect.php');

$q= "SELECT feed_id, feed_graphic AS graphic FROM feeds_user ORDER By feed_id";
$r= @mysqli_query ($dbc, $q);

while ($row = mysqli_fetch_array ($r, MYSQLI_ASSOC)){


echo '<table align="center" cellspacing="0" cellpaddin g="5" border="10" width="1100px">
<tr> .
    <td align="center"><a href="join.php"><img src="'. $row['graphic'] .'"></a></td>
    <td align="center"><a href="join.php"><img src="'. $row['graphic'] .'"></a></td>
    <td align="center"><a href="join.php"><img src="'. $row['graphic'] .'"></a></td>
    <td align="center"><a href="join.php"><img src="'. $row['graphic'] .'"></a></td>
</tr>'
;
}
echo
'</table>';


?>
 

Link to comment
Share on other sites

 Share

×
×
  • Create New...