本文整理汇总了PHP中Supplier::setName方法的典型用法代码示例。如果您正苦于以下问题:PHP Supplier::setName方法的具体用法?PHP Supplier::setName怎么用?PHP Supplier::setName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Supplier
的用法示例。
在下文中一共展示了Supplier::setName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Supplier
<div class="col-md-8">
<button id="sbt" name="sbt" class="btn btn-success">Insert</button>
</div>
</div>
</fieldset>
</form>
<?php
include "supControl.php";
include_once "Supplier.php";
if (isset($_POST['sbt'])) {
//creates the model class
if (filter_input(INPUT_POST, 'npwd') == filter_input(INPUT_POST, 'vpwd')) {
$newSup = new Supplier();
//setting values to model Item
$newSup->setName(filter_input(INPUT_POST, 'sname'));
$newSup->setNIC(filter_input(INPUT_POST, 'nic'));
$newSup->setPrev(filter_input(INPUT_POST, 'prv'));
$newSup->setLPN(filter_input(INPUT_POST, 'lpn'));
$newSup->setMPN(filter_input(INPUT_POST, 'mpn'));
$newSup->setEmail(filter_input(INPUT_POST, 'email'));
$newSup->setADR(filter_input(INPUT_POST, 'adr'));
$newSup->setPWD(filter_input(INPUT_POST, 'npwd'));
$reulst = supControl::Insert($newSup);
//prints the alert
if ($reulst > 0) {
echo "Data Inserted Successfully.";
} else {
echo "Error Inserting Record.";
}
} else {
示例2:
$supplier->setValue('appstatus', $_POST['Status_ID']);
}
if (isset($_POST['sremarks'])) {
$supplier->setValue('sremarks', $_POST['sremarks']);
}
if (isset($_POST['appdatedb'])) {
$supplier->setValue('appdatedb', $_POST['appdatedb']);
}
if (isset($_POST['supscopeid'])) {
$supplier->setValue('supscopeid', $_POST['supscopeid']);
}
if (isset($_POST['showinlist'])) {
$supplier->setValue('showinlist', $_POST['showinlist']);
}
$supplier->setSID($cid);
$supplier->setName($_POST['name']);
$supplier->setAddressl1($_POST['addl1']);
$supplier->setAddressl2($_POST['addl2']);
$supplier->setContactPerson($_POST['cper']);
$supplier->setPhoneNo($_POST['phone']);
$supplier->setTINNo($_POST['tinno']);
$supplier->setPANNo($_POST['panno']);
$supplier->setExciseNo($_POST['excise']);
$supplier->saveSupplier($cid);
$supplier->saveScope();
if ($pimg != '') {
$supplier->delBrand($pimg);
}
if ($blistsupplier != '') {
$supplier->saveBrand($blistsupplier);
}