Problem in Subtraction

newphpcoder
12:08:10
Good day!

I need to automatically subtract the input qty and output qty and the result should be appear in the text area of qty.

the input qty and output qty depend on the operation name.

i try this code:

[PHP]
<?php
include("config.php");

$query = "SELECT operation_name FROM clt_traceability WHERE operation_name = '01. Spreading'";

$inqty = $_POST['input_qty'];
$outqty = $_POST['output_qty'];
$qty = $_POST['variance_qty'];

$qty = $inqty - $outqty;


?>
<html>
<body>
Input<input type = 'text' name='inqty' id='inqty' />
Output<input type = 'text' name='outqty' id='outqty' />
Qty<input type = 'text' name='qty' id='qty' />
</body>
</hmtl>
[/PHP]

in this code when i enter input = 100 output= 50 and when I enter or I used tab no output in qty.

Thank you..
Please Login to post your reply or start a new topic