<?php


include 'config.php';
$_GET = str_replace($interzis, $replace, $_GET);
$_POST = str_replace($interzis, $replace, $_POST);

$da = $_POST['da'];
$id = $_GET['id'];

    $link = mysql_connect($baza['host'], $baza['user'], $baza['pass'])
        or die("Could not connect : " . mysql_error());
    mysql_select_db($baza['nume']) or die("Eroare!, nume baza de date incoreta");
$table = $baza['table'];


if ($_POST['send'] == "") {
    $a = mysql_fetch_assoc(mysql_query("SELECT * FROM $table  WHERE id = '$id'"));
$intrebare = $a['intrebare'];
$nume = $a['nume'];
$oponent1 = $a['oponent1'];
$oponent2 = $a['oponent2'];

echo <<<HTML
<br /><br /><br />
<center>
<form action="admin.php?p=delete&id=$id" method="post">
<h3>Stergere $id:</h3>
  <table border="0">
<tr>
 <td></td>
 <td>Sunteti cunvins ca doriti sa stergeti sondajul: $intrebare | $oponent1 vs $oponent2 ? </td>
</tr>
<tr>

<tr>
 <td><b>&nbsp;</b></td>
 <td>&nbsp;</td>
</tr>
<tr>
 <td><b></b></td>
 <td><input type="submit" name="send" value="Da!"></td>
</tr>
 </table>
 </form>
 </center>
 <hr />
HTML;
} else {

mysql_query("DELETE FROM $table WHERE id = $id");
 echo 'Sondaj sters :( !';
}
?>