|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PHP Forum
okay, im tryin to make a small and simple forum, but am having trouble at the first hurdle
my problem is that i want each forum, or topic, to be in a new layout cell, which is fine, i can do that, although, when i echo it out, instead of them all being under each other, they're next to each other..no matter where i put <br> it just doesnt seem to work any help is much appreciated |
|
#2
|
|||
|
|||
|
RE: PHP Forum
This is what I do...
www.forevercode.d2g.com/vb.php <body bgcolor="black"> Choose a topic: <br> <table border="0" width="100%"> <tr> <td width = "36%"><font color =#DDDDDD><b>Forum</font></td> <td width = "32%"><font color =#DDDDDD><b>Author</font></td> <td width = "12%"><font color =#DDDDDD><b>Date</font></td> <td width = "10%"><font color =#DDDDDD><b>Msgs</font></td> <table border='0' width='100%'><tr></tr></table><table border='0' width='100%' bgcolor=#999999> <? $link = mysql_connect("localhost", "user", "pass") or die("Could not connect"); mysql_select_db("Forum"); $query = "SELECT id, topic, uname, date, msgs FROM c ORDER BY id DESC;"; $result = mysql_query($query) or die("bad query"); if($result != ""){ while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { $u = 0; foreach ($line as $col_value) { $u++; switch ( $u ) { case 1: $id = $col_value; break; case 2: $topic = $col_value; break; case 3: $aname = $col_value; break; case 4: $date = $col_value; break; case 5: $msgs = $col_value; break; default: break; } } $all = "<tr><td width = '36%' bgcolor=#000000><a href='ShowC++F.php?Num=$id'>$topic</a></td>rn <td width = '32%' bgcolor=#000000><font color = 'White'>$aname</td>rn <td width = '12%' bgcolor=#000000><font color = 'White'>$date</td>rn <td width = '10%' bgcolor=#000000><font color = 'White'>$msgs</td>rn</tr>"; echo $all; } } ?> </table> |
![]() |
| Viewing: Codewalkers Forums > PHP Related > PHP Coding > PHP Forum |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|