$ID = $_POST['ID']; $last_date = date(Ymd); $pswinv = $_POST['pswinv']; $shipdate = $_POST['shipdate']; $shipdateex = explode('-',$shipdate); $last_date = $shipdateex[2].$shipdateex[0].$shipdateex[1]; echo("$last_date"); $newstock = $_POST['shipquantity']; $reportemail = $_POST['reportemail']; $ponum = $_POST['ponum']; $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_products', $dbcnx); ?>
Product Inventory
Inventory Control - Shipping
$first = @mysql_query("SELECT ID,prodname,prodnum,located,state,stock FROM inventory WHERE ID = '$ID'"); $firstlist = mysql_fetch_row($first); $ID = $firstlist[0]; $prodname = $firstlist[1]; $prodnum = $firstlist[2]; $city = $firstlist[3]; $state = $firstlist[4]; $oldstock = $firstlist[5]; $stock = $oldstock - $newstock; $result = @mysql_query("UPDATE inventory SET stock='$stock',last_date='$last_date' WHERE ID = '$ID'"); if (!$result){ die ("
Error Updating Data Base!
". 'Error:' . mysql_error() . '
'); }else{ echo("
Shipment Recorded Successfully
" . "
" . "
" . "
Product Name: $prodname
" . "
Product Number: $prodnum
" . "
" . "
Location: $city, $state
" . "
" . "
Stock: $stock
" . "
" . "
" . "
Click "Confirm" to complete the Inventory Update.
" . "
"); } ?>
Inventory Home
Return to Your Page
©2005 - Data Base Interface - Custom Built at: