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



							if (isset($_GET['id']))
							{
			 	 $dbc=mysqli_connect("localhost","xskzgajq_nyi","@@weqw1@@Yuio@@","xskzgajq_pos");
						
						$id = $_GET['id'];
						$result = mysqli_query($dbc,("select ex_nam,amnt,date,descr,
exp_id from expens inner join   expe on expe.ex_id=expens.ex_id  where exp_id='$id'"));
						
						$row = mysqli_fetch_array($result);
					
						$amount=$row["amnt"];
					
						mysqli_close($dbc);
						}
						
						?>




<form action="edit_expes.php" method="post">
<input name="m" type="hidden" value="<?php echo $id; ?>"/>
<input name="gg" type="hidden" value="<?php echo $pleft; ?>"/><br />
<? ECHO"<b>Expense name:<br />
<input name='p' type='text' value='{$row['ex_name']}' size='60'/><br />";?>
<b>Amount:<br />
<input name="qty" type="text" value="<?php echo $amount; ?>" size="50"/><br />

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