Chi mi aiuta??
Codice PHP:
<?php
session_start();
include('./function.php');
$makeconn = mysql_connect('localhost','user','pass');
//Controllo se si hanno effettivamente i permessi
if ((! $_SESSION['ax'] == '1') && (! $_SESSION['ax'] == '2') && (! $_SESSION['ax'] == '11'))
{
echo $_SESSION['ax'];
syntax();
}
//Conta gli elementi
$count = count($_POST["wnc"]) - 1;
$number = 0;
while ($number <= $count)
{
mysql_select_db('widlite_wdir', $makeconn)
mysql_query("INSERT INTO " . $_POST["cat"][$number] . " SET
wnc = '" . $_POST["wnc"][$number] . "',
url = '" . $_POST["indirizzo"][$number] . "',
titolo = '" . $_POST["titolo"][$number] . "',
descrizione = '" . $_POST["descrizione"][$number] . "',
subdir = '" . $_POST["sub"][$number] . "'", $makeconn);
error();
mysql_close($makeconn);
mysql_select_db('widlite_data', $makeconn);
mysql_query("DELETE FROM webber WHERE indirizzo = '" . $_POST["prime"][$number] . "'", $makeconn);
mysql_close($makeconn);
$number++;
}
unset($_SESSION['id']);
header("Location: /perfect.php");
exit;
?>