本文整理匯總了PHP中crud::getID方法的典型用法代碼示例。如果您正苦於以下問題:PHP crud::getID方法的具體用法?PHP crud::getID怎麽用?PHP crud::getID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類crud
的用法示例。
在下文中一共展示了crud::getID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: crud
include_once '../classes/class.goals.crud.php';
$crud = new crud($conn);
if (isset($_POST['btn-update'])) {
$uid = $_GET['edit_id'];
$timeframe = $_POST['timeframe'];
$goal = nl2br2($_POST['goal']);
$actions = nl2br2($_POST['actions']);
if ($crud->update($uid, $timeframe, $goal, $actions)) {
$msg = "<div class='alert alert-info'>\n\t\t\t\t<strong>WOW!</strong> Record was updated successfully <a href='index.php'>HOME</a>!\n\t\t\t\t</div>";
} else {
$msg = "<div class='alert alert-warning'>\n\t\t\t\t<strong>SORRY!</strong> ERROR while updating record !\n\t\t\t\t</div>";
}
}
if (isset($_GET['edit_id'])) {
$id = $_GET['edit_id'];
extract($crud->getID($id));
}
?>
</head>
<body >
<!---- Include Header ----->
<?php
include '../includes/menubars.inc.php';
?>
<!-- Main body
================== -->