function saveEditSupplier($handler, $supplierId, $vendor, $name, $tel, $fax, $info, $dumptime, $line1, $line2, $city, $state, $zip, $box) { $supplier = getBasicSupplierInfo($handler, $supplierId); $tel = cleanPhoneNumber(mysql_real_escape_string($tel)); $fax = cleanPhoneNumber(mysql_real_escape_string($fax)); $addressId = editAddress($handler, $supplier['addressId'], $line1, $line2, $city, $state, $zip, $box); $supplierQuery = "UPDATE supplier SET\n\t\tsupplierName = '{$name}',\n\t\tvendorId = '{$vendor}',\n\t\tsupplierTel = '{$tel}',\n\t\tsupplierFax = '{$fax}',\n\t\tsupplierInfo = '{$info}',\n\t\tsupplierDumptime = '{$dumptime}'\n\tWHERE supplierId = '{$supplierId}'"; mysql_query($supplierQuery, $handler); return $supplierId; }
<?php include './admin/config.php'; include './admin/db_connection.php'; $id = $_GET['id']; $_SESSION['job'] = $_REQUEST['jobref']; $_SESSION['qty'] = $_REQUEST['quantity']; $user_id = $_SESSION['sohorepro_userid']; $id_user = $_SESSION['sohorepro_companyid']; $company_id = company_id($user_id); $editAddress = editAddress($id); $user_manager = CheckManager($user_id); $state_all = StateAll(); if ($_REQUEST['edit_address'] == '1') { extract($_POST); $sql = "UPDATE sohorepro_address SET comp_id = '". $company_id ."', company_name = '". $comp ."', address_1 = '". $add1 ."', address_2 = '". $add2 . "', address_3 = '". $add3 . "', city = '". $city ."', state = '". $state."', zip = '". $zip ."', zip_ext = '" . $zipext."', phone = '". $phone ."', extension = '". $ext ."', attention_to = '". $attention."' WHERE id = '".$id."' "; $sql_result = mysql_query($sql); if(($user_manager == '1') && ($editAddress[0]['type'] == '1')) { ?>