call/post mysql into tables

girlnextdoor

New Member
I'm trying to get it to look at the mysql rows and if the rows equal left then draw this table.Blocks has the following:\[code\]id\[/code\],\[code\]title\[/code\],\[code\]file\[/code\],\[code\]side\[/code\]\[code\]$queryblocks = mysql_query("SELECT * FROM blocks ORDER BY id") or die(mysql_error());while($data = http://stackoverflow.com/questions/14473412/mysql_fetch_array($queryblocks)) {//select blocks$blocktitle = $data["title"];$blockcontent = $data["file"];$blockside = $data["side"];}if($blockside = "Left"){//START LEFT BLOCKSecho "<table bgcolor=\"#141414\" width=\"150\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" valign=\"left\"><tr><td width=\"150\" height=\"22\" background=\"cpstyles/TeamofGoD/sidebar.gif\"><center><font color=\"#ffffff\">$blocktitle</font><center></td></tr><tr><td width=\"150\" background=\"cpstyles/TeamofGoD/block-bg.gif\"><center>$blockcontent</center></tr><tr><td width=\"150\"><center><img src=http://stackoverflow.com/"cpstyles/TeamofGoD/sidebar2.gif\"></center></td></tr></table><br>";}\[/code\]
 
Back
Top