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