Søge funktion og Sorter
Følgenedene script henter liste fra MySQL dbJeg vil gerne have mulighed for at sorter efter:
Nr. (A > Å)(A < Å)
Title (A > Å)(A < Å)
Dato (A > Å)(A < Å)
Skulle også gerne kunne søge imellem dem.
echo'<table cellspacing="5" width="540" bgcolor="#4f4f4f">
<tr>
<td width="30px"><p><strong>Nr.</strong></p></td>
<td width="250px"><p><strong>Title</strong></p></td>
<td width="110px"><p><strong>Rediger</strong></p></td>
<td width="140px"><p><strong>Dato</strong></p></td>
</tr>';
while($row = mysql_fetch_array($result)) {
echo'<tr>
<td style="background-color:#6a6a6a;"><p>
' . $row['nr'] . '
</p></td>
<td style="background-color:#6a6a6a;"><p>
' . $row['title'] . '
</p></td>
<td style="background-color:#6a6a6a;"><p>
<a href="' . $_SERVER['SCRIPT_NAME'] . '?edit=' . $row['id'] . '">Rediger</a> |
<a href="#" onclick="if(confirm(\'Er du sikker på, at du vil slette?\')) {document.location.href=\'scripts.php?delete=' . $row['id'] . '&return=' . rawurlencode($_SERVER['REQUEST_URI']) . '\';}">Slet</a>
</p></td>
<td style="background-color:#6a6a6a;"><p>
' . strftime("%A %d. %B %Y",$row['time']) . '
</p></td>
</tr>';
}
echo'</table>';
