<?php
require_once('functions.php');

$user=$_SESSION['user'];
require_once('mysql.php');


$a=mysqli_real_escape_string($dbc,$_POST['a']);
$c=mysqli_real_escape_string($dbc,$_POST['c']);
$qty=mysqli_real_escape_string($dbc,$_POST['qty']);
$cod=mysqli_real_escape_string($dbc,$_POST['cod']);
$e=mysqli_real_escape_string($dbc,$_POST['ee']);
$m=mysqli_real_escape_string($dbc,$_POST['m']);
$p=mysqli_real_escape_string($dbc,$_POST['p']);
$cat=mysqli_real_escape_string($dbc,$_POST['cat']);
$maxi=mysqli_real_escape_string($dbc,$_POST['maxi']);
$minn=mysqli_real_escape_string($dbc,$_POST['minn']);
$minimum=mysqli_real_escape_string($dbc,$_POST['mini']);
$pro=$_POST['p'];
$gg=$_POST['gg'];
$vat=$_POST['vat'];
$k=mysqli_real_escape_string($dbc,$_POST['k']);
$re=mysqli_real_escape_string($dbc,$_POST['f']);
$res=mysqli_real_escape_string($dbc,$_POST['x']);
$buying=mysqli_real_escape_string($dbc,$_POST['buying']);

$fr=mysqli_query($dbc,("UPDATE products SET left_p='$qty',category='$cat', buying='$buying',
 price = '$e',p_name='$p',minimum='$minimum'
WHERE product_id = '$m'"));

  header("location: products_view.php");
		


mysqli_close($dbc)

	
?>