當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Vendor::toDatabase方法代碼示例

本文整理匯總了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");
開發者ID:gogolB,項目名稱:pinkies2,代碼行數:27,代碼來源:onVendorSubmit.php


注:本文中的Vendor::toDatabase方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。