> I'm having a little problem displaying the result of a SQL query in a
table.
> This is the PHP code i use:
>
> ----- PHP CODE -----
> $GBGet = "SELECT RegDate, RegTime, name, email, comment FROM guestbook";
> $GBResult = mysql_query($GBGet);
>
> print("<table border=1 cellpadding=2 cellspacing=2 bordercolor=000000>"
;
> print("<tr><td width=20><b>Date:</b></td><td width=20><b>Time:</b></td><td
> width=100><b>Name:</b></td><td width=100><b>E-mail:</b></td><td
> width=200><b>Comment:</b></td></tr>"
;
>
> while($rad = mysql_fetch_array($GBResult))
> {
> print("<tr><td>"
;
> print($rad["RegDate"]);
> print("</td><td>"
;
> print($rad["RegTime"]);
> print("</td><td>"
;
> print($rad["name"]);
> print("</td><td>"
;
> print($rad["email"]);
> print("</td><td>"
;
> print($rad["comment"]);
> print("</td></tr"
;
> }
>
> mysql_free_result($GBResult);
> print("</table>"
;
>
> ---- END OF PHP CODE ----
>
> The result of this will be only one row in a table where the 4 first
columns
> are correct then it puts the second row in my table in the same row.
>
> Anyone have any ideas of why?
> FYI: I'm quite new to PHP and MySQL
>
>
>
table.
> This is the PHP code i use:
>
> ----- PHP CODE -----
> $GBGet = "SELECT RegDate, RegTime, name, email, comment FROM guestbook";
> $GBResult = mysql_query($GBGet);
>
> print("<table border=1 cellpadding=2 cellspacing=2 bordercolor=000000>"

> print("<tr><td width=20><b>Date:</b></td><td width=20><b>Time:</b></td><td
> width=100><b>Name:</b></td><td width=100><b>E-mail:</b></td><td
> width=200><b>Comment:</b></td></tr>"

>
> while($rad = mysql_fetch_array($GBResult))
> {
> print("<tr><td>"

> print($rad["RegDate"]);
> print("</td><td>"

> print($rad["RegTime"]);
> print("</td><td>"

> print($rad["name"]);
> print("</td><td>"

> print($rad["email"]);
> print("</td><td>"

> print($rad["comment"]);
> print("</td></tr"

> }
>
> mysql_free_result($GBResult);
> print("</table>"

>
> ---- END OF PHP CODE ----
>
> The result of this will be only one row in a table where the 4 first
columns
> are correct then it puts the second row in my table in the same row.
>
> Anyone have any ideas of why?
> FYI: I'm quite new to PHP and MySQL
>
>
>