La mia query funziona se lanciata sul db ma dal php no.
Vi allego il file:
<html><head><title>Inserimento note</title></head>
<body>
<?php
include('genclass.php');
include('directauto.php');
$dbc=new db();
$dbc->dbconnect();
if (!isset ($note)) $note="";
if (!isset ($jobnum)) $jobnum="";
?>
<form name="form" method="get" action="insNota2.php">
<?php
if(isset($_GET['Aggiorna'])){
$query = "UPDATE vetture SET note='$note' where jobnum='$jobnum'";
echo "$query";
}
?>
<?php
$sql="select note,jobnum from vetture where jobnum='$jobnum'";
$result=mysql_query($sql) or die(mysql_error());
$number = mysql_numrows($result);
for($i=0;$i<$number;$i++){
$note=mysql_result($result,$i,"note");
$jobnum=mysql_result($result,$i,"jobnum");
}
?>
<strong>Inserisci note<input name="note" size="200" value="<?php echo "$note";?>"></strong>
<strong><input hidden="jobnum" name="jobnum" size="200" value="<?php echo "$jobnum";?>"></strong>
<input type="submit" name="Aggiorna" value="Aggiorna">
</form>
</body>
</html>
Grazie mille. Cristina