本文整理匯總了PHP中crud::create方法的典型用法代碼示例。如果您正苦於以下問題:PHP crud::create方法的具體用法?PHP crud::create怎麽用?PHP crud::create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類crud
的用法示例。
在下文中一共展示了crud::create方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: crud
<?php
if (!empty($_POST['name']) && !empty($_POST['face']) && !empty($_POST['INN']) && !empty($_POST['Bik']) && !empty($_POST['Rs']) && !empty($_POST['address'])) {
require_once '../classes/crud.php';
$dbObject = new crud();
$dbObject->create('organizations');
}
示例2: url
include '../includes/form_validation_includes.php';
?>
<style type="text/css">
@import url("/css/main-css.css")
</style>
<?php
include_once '../mysql/hidden_files/database.php';
include_once '../classes/class.goals.crud.php';
$crud = new crud($conn);
if (isset($_POST['btn-save'])) {
$user_id = $_POST["uid"];
$username = $_POST['username'];
$timeframe = $_POST['timeframe'];
$goal = nl2br2($_POST['goal']);
$actions = nl2br2($_POST['actions']);
if ($crud->create($user_id, $username, $timeframe, $goal, $actions)) {
//header("Location: ../mysql/add_goals.php?inserted");
?>
<script> location.replace("../mysql/add_goals.php?inserted"); </script>?<?php
} else {
?>
<script> location.replace("../mysql/add_goals.php?failure"); </script>?<?php
}
}
?>
</head>
<body >
示例3: crud
<?php
session_start();
$workerId = $_SESSION['workerId'];
if (!empty($_POST)) {
require_once 'classes/crud.php';
$dbObject = new crud('tasks');
$_POST['idfrom'] = $workerId;
$_POST['opened'] = 1;
$_POST['cond'] = 1;
$dbObject->create();
}
示例4: crud
<?php
if (!empty($_POST['name']) && !empty($_POST['unit']) && !empty($_POST['priceOfUnit'])) {
require_once '../classes/crud.php';
$dbObject = new crud();
$dbObject->create('services');
}