本文整理匯總了PHP中Supplier::setCo_name方法的典型用法代碼示例。如果您正苦於以下問題:PHP Supplier::setCo_name方法的具體用法?PHP Supplier::setCo_name怎麽用?PHP Supplier::setCo_name使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Supplier
的用法示例。
在下文中一共展示了Supplier::setCo_name方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
include "/srv/athenace/lib/intranet/common.php";
include "/srv/athenace/lib/shared/functions_form.php";
$fields = array("co_name", "inv_email");
foreach ($fields as $field) {
if (!isset($_POST[$field])) {
$_POST[$field] = '';
}
}
// Check if we have Form Data to process
if (isset($_GET['go']) && $_GET['go'] == "y") {
$logContent = "\n";
// Add to Address table
$addsid = db_addAddress($_POST);
// Insert into DB
$supplierNew = new Supplier();
$supplierNew->setCo_name($_POST['co_name']);
$supplierNew->setAddsid($addsid);
$result['id'] = $supplierNew->insertIntoDB();
$logresult = logEvent(13, $logContent);
header("Location: /contacts/add.php?suppid=" . $result['id']);
exit;
}
// Define elements for the HTML Header include
$pagetitle = "Add a New Supplier";
include "../tmpl/header.php";
?>
<h1>Add a New Supplier</h1>
<form role="form" action="<?php
echo $_SERVER['PHP_SELF'];
示例2: array
$q = $db->select($sqltext, array($_GET['id']), 'i');
$r = $q[0];
$addsid = $r->addsid;
if (isset($_GET['remove']) && $_GET['remove'] == "y" && isset($_GET['id']) && is_numeric($_GET['id'])) {
// db_delete("supplier", $_GET['id'],'supplierid');
header("Location: /suppliers/");
exit;
}
// Check if we have Form Data to process
if (isset($_GET['go']) && $_GET['go'] == "y") {
// Update Address table
$addsid = db_updateAddress($_POST, $addsid);
# Update DB
$supplierUpdate = new Supplier();
$supplierUpdate->setSuppid($_GET['id']);
$supplierUpdate->setCo_name($_POST['co_name']);
$supplierUpdate->setContact($_POST['contact']);
$supplierUpdate->setColour($_POST['colour']);
$supplierUpdate->updateDB();
header("Location: /suppliers/");
exit;
}
// Define elements for the HTML Header include
$pagetitle = "Edit supplier";
$pagescript = array("/js/picker.js");
$pagestyle = array();
include "../tmpl/header.php";
?>
<h1>Edit Supplier</h1>