本文整理汇总了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');
}