View Single Post
  #2 (permalink)  
Old February 19th, 2007, 05:56 AM
prashu_hi25 prashu_hi25 is offline
Authorized User
Join Date: Feb 2007
Location: , , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts

Hi greep,

i think u can display the data in two columns like this below. I have showed with three columns i hope this will help u.

mysql_connect(DB_SERVER,DB_USER,DB_PASSWORD) or die(mysql_error()); //connecting to mysql
mysql_select_db(DATABASE) or die(mysql_error()); //connecting to mysql database

$result1=mysql_query("SELECT name,email,comments FROM ".DATABASE_TABLE." ORDER BY id DESC") or die(mysql_error());

echo "GUEST BOOK";
echo "<table bgcolor=\"#CCCCCC\" border=\"1\" align=\"center\">";
echo "<tr><th>NAME</th><th>EMAIL</th><th>COMMENTS</th></tr>";
            echo "<tr><td>";
            echo $row['name'];
            echo "</td><td>";
            echo $row['email'];
            echo "</td><td>";
            echo $row['comments'];
            echo "</td></tr>";
        echo "</table>";
Reply With Quote