本文整理汇总了PHP中Catalog::initialBooksFields方法的典型用法代码示例。如果您正苦于以下问题:PHP Catalog::initialBooksFields方法的具体用法?PHP Catalog::initialBooksFields怎么用?PHP Catalog::initialBooksFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Catalog
的用法示例。
在下文中一共展示了Catalog::initialBooksFields方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Catalog
<?php
include_once 'catalog.php';
session_start();
include_once 'config.php';
$object = new Catalog(LOCALHOST, NAME, PASSWORD, DATABASE);
$base = new WorkDB(LOCALHOST, NAME, PASSWORD, DATABASE);
$id = $_SESSION['ID'];
$data = $base->selectID($id);
$result = $object->loadFieldFromTable($data);
if (@$_POST['update']) {
$object->initialBooksFields(NULL, $_POST['description'], $_POST['price'], NULL, NULL);
if ($object->updateBook($_POST['ID'])) {
unset($object);
header("Location: correctBook.php");
}
}
unset($object);
unset($base);
include "updateBook.htm";
示例2: Catalog
<?php
if (@$_POST['add']) {
include_once 'catalog.php';
include_once 'config.php';
$object = new Catalog(LOCALHOST, NAME, PASSWORD, DATABASE);
$object->initialBooksFields($_POST['nameBook'], $_POST['description'], $_POST['price'], $_POST['author'], $_POST['genre']);
$data = $object->addBook();
unset($object);
}
include "addBook.htm";