<?php
include ("config18.php");
mysql_connect("$hhost","$login","$pass") or die ("Problem connecting to DataBase"); 
$query = "SELECT * FROM $connect where oggnom='$oggnom' "; 
$result = mysql_db_query("$dbname", $query); 
if ($result) {
while ($r = mysql_fetch_array($result)) {

$quant = $r["quant"];

}

}

$tot =	$quant + $aggquant ;
$query = "update $connect  set 
quant='$tot', prezog='$prezog' where 
oggnom='$oggnom'";
$result = mysql_db_query("$dbname", $query);
include ("Admin_gestmagaz.php");
echo "<p align=center>Articolo $oggnom aggiornato nuova quantità $tot nuovo prezzo $prezog</p>";
?>

