Here's the headers of the table, from which the data from the database is selected and displayed:
<?
echo ("
<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" marginheight=\"0\" marginwidth=\"0\">
<tr>
<td background=\"tablebg.gif\" class=\"row\" width=\"10%\">[b]Tag[/b]1</td>
<td background=\"tablebg.gif\" class=\"row\" width=\"10%\">[b]Tag2[/b]</td>
<td background=\"tablebg.gif\" class=\"row\" width=\"8%\">[b]Tag3[/b]</td>
</tr>
</table>
");
?>
Here's the code I use for which I need it:
<?
$username="username";
$password="password";
$database="database";
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM something";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$something=mysql_result($result,$i,"something");
$something=mysql_result($result,$i,"something");
$something=mysql_result($result,$i,"something");
echo ("
<table width=\"100%\" cellspacing=\"0\" cellpadding=\"4\">
And here is the output produced from the database, which I want to sort by name, if someone clicks one of the tags mentioned earlier:
<tr> <td valign=\"top\" width=\"10%\">$something</td> <td valign=\"top\" width=\"10%\">$something</td> <td valign=\"top\" width=\"8%\">$something</td> </tr> </table> "); $i++; } ?>
