Forum Moderators: coopster

Message Too Old, No Replies

Php Mysql

Output Format and Layout Issues

         

zyshen

7:52 pm on Jun 17, 2004 (gmt 0)

10+ Year Member



I am using php and mysql to build a guest book. It's almost complete beside on problem. I limit the msg size to 200 chars. But when the posts are displayed, a single message can stretch as long as the message is. There is no text wrap or anything. The totally screw up my page layout since the screen is widened by 400-500%. below is the code and the page use CSS for layout.

for ($i=0; $i<10 && $line= mysql_fetch_object($result, MYSQL_ASSOC); $i++) {
echo '<tr><td valign="top" width="600px"><hr size="3">';
echo 'Message #' . $line->id .' <b>' . $line->user_name . '</b> ' . $line->msg_time . '<br>';
echo $line->message . '<br>';
echo '</td></tr>';
}

jatar_k

10:37 pm on Jun 17, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I was expecting to see pre tags but it doesn't seem that is the case.

what about changing width="600px" to width="600"

that is the only thing I can think of, the rest wouldn't do anything. The width should confine it and force it to wrap.