本文整理匯總了PHP中Supplier::updateSupplier方法的典型用法代碼示例。如果您正苦於以下問題:PHP Supplier::updateSupplier方法的具體用法?PHP Supplier::updateSupplier怎麽用?PHP Supplier::updateSupplier使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Supplier
的用法示例。
在下文中一共展示了Supplier::updateSupplier方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Supplier
/****** END DEBUG*****/
$suppliers = new Supplier($mysqli);
//~ //error_log("Supplier " . $_REQUEST['id']. " " . $_REQUEST['addressid']);
$id = $mysqli->escape_string($_REQUEST['id']);
$supplier_name = $mysqli->escape_string($_REQUEST['supplier_name']);
$phonenumber = $mysqli->escape_string($_REQUEST['phonenumber']);
$email = $mysqli->escape_string($_REQUEST['email']);
if (strlen($supplier_name) > 20 || strlen($email) > 20) {
echo "Input String too long, possibly > 20 Chars. Reconsider input please...";
exit;
}
if (!isphonenumberValid($phonenumber)) {
echo "Phonenumber format wrong or length exceeded";
exit;
}
$result = $suppliers->updateSupplier($id, $supplier_name, $phonenumber, $email);
if ($result == 0) {
echo "No Supplier has been updated!";
die;
} else {
echo "<br/> Supplier has been updated!";
}
} else {
if (isset($_POST['delete'])) {
/*******DEBUUG ***/
//~ ini_set("log_errors", 1);
//~ ini_set("error_log", "/tmp/php-error.log");
/****** END DEBUG*****/
$suppliers = new Supplier($mysqli);
$id = $mysqli->escape_string($_REQUEST['id']);
$addressid = $mysqli->escape_string($_REQUEST['addressid']);
示例2: Supplier
<?php
require_once "../../lib/supplier.class.php";
$objSupplierInfo = new Supplier();
extract($_POST);
$supplier_id = $_POST['supplier_id'];
$name = $_POST['name'];
$supplierCat = $_POST['select'];
$email = $_POST['email'];
$address = $_POST['address'];
$phone = $_POST['phone'];
$fax = $_POST['fax'];
$tin = $_POST['tin'];
$vat = $_POST['vat'];
$tradelicance = $_POST['tradelicance'];
$taxholiday = $_POST['taxholiday'];
$objSupplierInfo->updateSupplier($supplier_id, $name, $supplierCat, $email, $address, $phone, $fax, $tin, $vat, $tradelicance, $taxholiday);
echo "<b>Data Save Successsfull<b>";
?>