<?php
$pos=$_GET['pos'];
$nome=$_GET['nome'];
$host='localhost';
$user='cl';
$pass='cl';
$db='my_test';
$conn= mysql_connect($host, $user, $pass);
mysql_select_db($db,$conn);
if(!$conn)die("Errore di connessione".mysql_error());
$query ="DELETE FROM $pos WHERE {$nome}";
$rs = mysql_query($query,$conn);
if ( mysql_affected_rows()==1)
{
echo "record eliminato";
header("refresh:2; url=admin.php");
exit;
}else{
echo "record non eliminato";
header("refresh:2; url=admin.php");
exit;
}
?>