Buongiorno a tutti,
portate pazienza ma dopo averci passato ore a tentare chiedo aiuto.

Questa è una delle ultime versioni ....

<?php
if ($_POST) {

$nome = $_POST['nome'];
$cognome = $_POST['cognome'];

$id = $_GET['id'];

$sql = "UPDATE clienti SET Nome='$nome', Cognome='$cognome' WHERE IDcliente='$id' ";

if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record modificato";


mysql_close($con);

}



else {}



include("../../connect.php");

$id = $_GET['id'];

$result = mysql_query("SELECT * from clienti where IDcliente=" . $id);

while($row = mysql_fetch_array($result))
{
$id = $row['IDcliente'];
$nome = $row['Nome'];
$cognome = $row['Cognome'];
}

?>

<form action="modifica.php?id=<?php echo $id ?>" method="post">
<table align="center" width="500">
<tr>
<td class="testo2">Nome</td>
<td><input type="text" name="nome" class="testo" value="<?php echo $nome ?>" /></td>
</tr>
<tr>
<td class="testo2">Cognome</td>
<td><input type="text" name="cognome" class="testo" value="<?php echo $cognome ?>" /></td>
</tr>
</table>





<table align="center" width="500">
<tr>
<td align="center"><input type="button" value="Menu Principale" class="bottone" onclick="javascipt:DaiLink('../index.php')" /></td>
<td class="testo2"><input type="submit" value="Invia" class="bottone" /></td>
</tr>
</table>
</form>
questo mi da il seguente errore:
Notice: Undefined variable: con in C:\wamp\www\chic\gestione\clienti\modifica.php on line 53

Warning: mysql_query() expects parameter 2 to be resource, null given in C:\wamp\www\chic\gestione\clienti\modifica.php on line 53
Error:

La linea 53 è questa: if (!mysql_query($sql,$con))

Qualcuno ha voglia di dirmi la cacchiata che sto combinando '???

Grazie
Dago