Location: PHPKode > scripts > Tabs Links SQL > tabs-links-sql/admin.php

include "header.php";
include ("config.php");

$consulta = "select * from $tabelabd order by $ordem $direcao";
$resultado = mysql_query($consulta) or die("Cannot connect to BD");

$totallinks = mysql_num_rows($resultado);
echo "<font face='verdana,arial' size='2'><br>Total links: $totallinks <br></font>";

echo "<table border='0' width='430'>";

while ($linha = mysql_fetch_array($resultado)) {
	$id = $linha["id"];
	$data = $linha["data"];
	$nome = $linha["nome"];
	$descricao = $linha["descricao"];
	$link = $linha["link"];
 echo "<tr><td width='50%'><font face='verdana,arial' size='2'><a href='updel.php?id=$id&updel=atualizar' class='tabslinks'>Upd</a> | <a href='updel.php?id=$id&updel=deletar' onclick=\"return confirm('Are you sure to delete \'$nome\' ?\\n This link cannot be recovered');\" class='tabslinks'>Del - </a>&nbsp;<a href='$link' target='_blank' class='tabslinks'>$nome: </a> $descricao</font></td></tr>\n$linhatabela\n";

echo "</table>";

include "footer.php";
Return current item: Tabs Links SQL