本文整理汇总了PHP中Vendor::toDatabase方法的典型用法代码示例。如果您正苦于以下问题:PHP Vendor::toDatabase方法的具体用法?PHP Vendor::toDatabase怎么用?PHP Vendor::toDatabase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vendor
的用法示例。
在下文中一共展示了Vendor::toDatabase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onError
<?php
include_once 'includes/functions.php';
include_once 'includes/sessionFunctions.php';
include_once 'includes/vendor_object.php';
secureSessionStart();
if (!isset($_POST['vendorName']) || $_POST['vendorName'] == '') {
onError("Vendor Submission Error!", "No Vendor name set! Can not update in database without vendor name");
}
$_vendor = new Vendor();
if (isset($_POST['vendorID'])) {
$_vendor->i_VendorID = $_POST['vendorID'];
}
$_vendor->s_VendorName = $_POST['vendorName'];
$_vendor->s_Address = $_POST['address'];
$_vendor->s_City = $_POST['city'];
$_vendor->s_State = $_POST['state'];
$_vendor->s_Zip = $_POST['zip'];
$_vendor->s_Country = $_POST['country'];
$_vendor->s_UCRAccountID = $_POST['ucrAccountID'];
$_vendor->s_POC = $_POST['poc'];
$_vendor->s_PhoneNumber = $_POST['phoneNumber'];
$_vendor->s_FaxNumber = $_POST['faxNumber'];
$_vendor->s_Internet = $_POST['internet'];
$_vendor->toDatabase();
// All done, redirect to the vendor list page.
header("Location: ./vendor.php?reason=list");