Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » General Discussions » General Discussion » PHP help
PHP help [message #53863] Tue, 04 November 2003 14:59 Go to previous messageGo to previous message
Crimson is currently offline  Crimson
Messages: 7429
Registered: February 2003
Location: Phoenix, AZ
Karma:
General (5 Stars)
ADMINISTRATOR
<?PHP 
$products = "SELECT * FROM Products ORDER BY id DESC"; 
$result = mysql_query($products) or die ("Query Failed"); 

echo "<table width=\"100%\" border=\"1\">"; 
echo "<TR>"; 
$i=1;

while ($row = mysql_fetch_object($result)){ 
echo "<td colspan=\"2\"><font face=\"arial\" size=\"2\">$row->title</font></td>"; 
if ($i%2 == 0) {
echo "</TR><TR>"; 
}
echo "<td><font face=\"arial\" size=\"2\">$row->description</font></td>"; 
echo "<td><IMG SRC=\"upload/$row->image\" width=\"50\" height=\"50\"></td>"; 
$i++;
} 
echo "</TR>"; 
echo "</table>"; 
?>


I didn't test it, but that should work


I'm the bawss.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Crimson Server?????????
Next Topic: OT: 12 Years Today.
Goto Forum:
  


Current Time: Sat Dec 21 19:12:19 MST 2024

Total time taken to generate the page: 0.00785 seconds