本文整理汇总了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>";
?>