<?php include('open_connection.php');include('header.php'); ?>
<script>

function myFunction()
{
var y=document.getElementById("item_description");
var x=document.getElementById("item_qty");
var z=document.getElementById("item_unit_price");
x.value=x.value.toUpperCase();
y.value=y.value.toUpperCase();
z.value=z.value.toUpperCase();
}
</script>
<?php
 					
					//$staff_id=$_GET['staff_id'];
					$item_query=mysql_query("SELECT * FROM tbl_dir_fnb_item WHERE quotation_id='$quotation_id'")or die(mysql_error());
                    $row=mysql_fetch_array($item_query);
                    $quotation_id=$row['quotation_id'];
					//$cust_id=$row['cust_id'];
					
                ?>
				
		<?php 
				$item_id = $_REQUEST['item_id'];
				$result1=mysql_query("SELECT * FROM tbl_dir_fnb_item WHERE item_id='$item_id'");
			  						   
		    while($row = mysql_fetch_array($result1))
		{
		?>
				<?php echo $row['item_id']?>
				<?php echo $row['quotation_id']?>
				<!--?php echo $row['cust_id']?-->
				
		<div class="hero-body-add-user">                 
                <form class="form-horizontal" name="frm"  method="post" action="update_item_edit.php">
                    <fieldset>
				
					 <div class="control-group">
                            <label class="control-label" for="input01">Description</label>
                            <div class="controls"><input type="text"  name="item_description" class="input-xlarge" value="<?php echo  $row['item_description']; ?>"  id="spm_subject" onChange="myFunction()">
							</div>
                        </div>
						
						<div class="control-group">
                            <label class="control-label" for="input01">Qty</label>
                            <div class="controls"><input type="text"  name="item_qty" class="input-xlarge" value="<?php echo  $row['item_qty']; ?>" id="spm_grade" onChange="myFunction()">
							</div>
                        </div>
						<div class="control-group">
                            <label class="control-label" for="input01">Item unit price </label>
                            <div class="controls"><input type="text"  name="item_unit_price" class="input-xlarge" value="<?php echo  $row['item_unit_price']; ?>" id="item_unit_price" onChange="myFunction()">
							</div>
                        </div>
						
													
					<tr><td colspan=2><center><INPUT type="submit" class="btn btn-large" value="UPDATE" />
					<input action="action" type="button" class="btn btn-large" value="BACK" onClick="history.go(-1);" /></center></td></tr>
			 </fieldset>
                </form>
            </div>
        </div>

<?php } ?>