Ho letto i tuoi post.
Il jobnum può essere alfanumerico.
Ho modificato il file:
<html><head><title>Inserimento note</title></head>
<body>
<?php
include('genclass.php');
include('directauto.php');
$dbc=new db();
$dbc->dbconnect();
?>
<form name="form" method="get" action="insNota2.php">
<?php
if(isset($_GET['Aggiorna'])){
$note=$_GET['note'];
$jobnum=$_GET['jobnum'];
$query = "UPDATE vetture SET note='$note' where jobnum='$jobnum'";
mysql_query ($update_, $link)
or die ("Non riesco ad eseguire la query $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>
Mi esce questo risultato:
Non riesco ad eseguire la query UPDATE vetture SET note='llll' where jobnum='0024RBZ2'

Rispondi quotando