<?php
require_once('functions.php');
$user=$_SESSION['user'];
	$level=$_SESSION['BACK OFFICE'];



							if (isset($_GET['id']))
							{
					 $dbc=mysqli_connect("localhost","zeqrbruu_gikoshshop","@@bazuushop@@","zeqrbruu_gikosh");
						
						$id = $_GET['id'];
						$sal=$_GET['di'];
						$result = mysqli_query($dbc,("SELECT * FROM sales WHERE number = $id and sale_id='$sal'"));
						
						$row = mysqli_fetch_array($result);
						$id=$row["number"];
						$qty=$row["qty"];
						$pname=$row["p_name"];
						//$pdesc=$row["description"];
						$price=$row["price"];
						//$vat=$row["vat"];
							//$cat=$row["category"];
								$minimum=$row["minimum"];
						//$pprice=$row["price"];
							//$buying=$row["buying"];
							//$comp=$row["company"];
						//$re=$row["reorder"];
						mysqli_close($dbc);
						}
						
						?>




<form action="edit_pp.php" method="post">
<input name="m" type="hidden" value="<?php echo $id; ?>"/>
<input name="gg" type="hidden" value="<?php echo $sal; ?>"/><br />
<? ECHO"<b>Product name:<br />
<input name='p' type='text' value='{$row['p_name']}' size='60'/><br />";?>
<b>Name:<br />
<input name="qty" type="text" value="<?php echo $pname; ?>" size="50"/><br />
Qty:<br />
<input name="qty" type="text" value="<?php echo $qty; ?>" size="50" />
<br />
price:<br />
<input name="price" type="text" value="<?php echo $price; ?>"size="40" /><br />
<br />


<input name="submit" type="submit" value="save">
</form>
