Salve, io ho un problemino su questi due script:
in poce parole non mi modifica i record del database.
come mai ? mi proteste aiutare?.
grazie 
Codice PHP:
update.php
<?
include ("config.inc.php");
include ("top_foot.inc.php");
top();
?>
<?
$db = mysql_connect($db_host,$db_user,$db_password);
if ($db == FALSE) die ( " Errore nella selezione del database. Verificare i parametri nel file config.inc.php");
mysql_select_db($db_name, $db)
or die ("errore nella selezione");
$query = "SELECT id,titolo,testo,data,autore,mail FROM news WHERE id='$id'";
$result = mysql_query($query,$db);
$row = mysql_fetch_array($result);
?>
<form method="post" action="upsave.php?id=<?=$row[id];?>">
Titolo:
<input type="text" size="40" name="titolo" value="<?=$row[titolo];?>">
Data: <select name="giorno">
<? for ($i=1; $i<=31; $i++)
echo "<option value=$i>$i";
?>
</select>
<select name="mese">
<option value="1">Gennaio
<option value="2">Febbraio
<option value="3">Marzo
<option value="4">Aprile
<option value="5">Maggio
<option value="6">Giugno
<option value="7">Luglio
<option value="8">Agosto
<option value="9">Settembre
<option value="10">Ottrobe
<option value="11">Novembre
<option value="12">Dicembre
</select>
<select name="anno">
<option value="2001">2001
<option value="2002">2002
<option value="2003">2003
<option value="2004">2004
<option value="2005">2005
</select>
Autore:
<input type="text" size="40" name="autore" value="<?=$row[autore];?>">
Email:
<input type="text" size="40" name="mail" value="<?=$row[mail];?>">
Testo:
<textarea cols="60" rows="40" name="testo"><?=$row[testo];?></textarea>
<input type="submit" value="Invia"></form>
<?
mysql_close($db);
foot();
?>
ed quell'altro:
Codice PHP:
upsave.php
<?
include("top_foot.inc.php");
include("config.inc.php");
top();
if (trim($titolo) == "" OR Trim($testo) == ""):
echo " I campi Titolo e Testo devono essere riempiti!";
else:
$titolo = addslashes(stripslashes($titolo));
$autore = addslashes(stripslashes($autore));
$mail = addslashes(stripslashes($mail));
$testo = addslashes(stripslashes($testo));
$titolo = str_replace("<", "<", $titolo);
$titolo = str_replace(">", ">", $titolo);
$autore = str_replace("<", "<", $autore);
$autore = str_replace(">", ">", $autore);
$testo = str_replace("<", "<", $testo);
$testo = str_replace(">", ">", $testo);
$testo = nl2br($testo);
$testo = stripslashes($testo );
$testo = htmlspecialchars($testo );
$testo = nl2br($testo);
$data = mktime("0","0","0", $mese, $giorno, $anno);
$db = mysql_connect($db_host,$db_user,$db_password);
if ($db == FALSE) die ( " Errore nella selezione del database. Verificare i parametri nel file config.inc.php");
mysql_select_db($db_name, $db)
or die ("errore nella selezione");
$query = "UPDATE news SET "
." titolo=\"".$_POST['titolo']."\""
.",autore=\"".$_POST['autore']."\""
.",testo=\"".$_POST['testo']."\""
.",mail=\"".$_POST['mail']."\""
." WHERE ID = '".$_GET['ID']."'";
if (mysql_query($query,$db))
echo "L'Articolo è stato modificato corretamente";
else
echo "Errore durante l'inserimento";
mysql_close($db); endif;
foot();
?>