RE: [PHP-DB] PHP results bold in HTML
| From: | Matt Williams | Date: | Fri, 16 Nov 2001 11:51:24 +0000 |
| Subject: | RE: [PHP-DB] PHP results bold in HTML | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-14391@lists.php.net to get a copy of this message | ||
>
> $result = mysql_query($query);
> $num_rows = mysql_num_rows($result);
>
> if ($num_rows != 0)
> {
> print "
> <table class=\"db1\">
> <tr>
> <td width=\"60\"></th>
> <td width=\"135\"><b>Class</b></th>
> <td width=\"135\"><b>Name</b></th>
> <td width=\"135\"><b>Type</b></th>
> <td width=\"135\"><b>NPC</b></th>
> </tr>";
>
> while ($row = mysql_fetch_array($result))
> {
>
> $name = $row["SimName"];
> $class = $row["SimClass"];
> $type = $row["ClassType"];
> $NPC = $row["SimNPC"];
>
> if ($NPC == 1)
> {
> echo "
> <tr>
> <td></th>
> <td>$class</th>
> <td>$name</th>
> <td>$type</th>
> <td>NON PLAYING SIM</th
> </tr>\n";
> }
> else
> {
> echo "
> <tr>
> <td></th>
> <td>class</h3></th>
> <td>$name</h3></th>
> <td>$type</h3></th>
> <td>ACTIVE SIM</h3></th
> </tr>\n";
> }
> };
> }
>
First things first go through your html and clean up man. This is seriously
bad...
Don't close <td> with </th>, mkae sure you tags are closed ie </th
no opening tags for </h3>
Then try again
M: