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



							if (isset($_GET['id']))
							{
				 $dbc=mysqli_connect("localhost","root","","point_of_sale");
						
						$id = $_GET['id'];
					//	$sal=$_GET['di'];
						$result = mysqli_query($dbc,("SELECT distinct(name)as name FROM sales where session='$id'"));
						
						$row = mysqli_fetch_array($result);
					//	$id=$row["number"];
					//	$qty=$row["qty"];
						$name=$row["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_cus.php" method="post">
<input name="m" type="hidden" value="<?php echo $id; ?>"/>

<? ECHO"<b>Customer name:<br />
<input name='p' type='text' value='{$row['name']}' size='60'/><br />";?>





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