本文整理匯總了PHP中post::sanitize方法的典型用法代碼示例。如果您正苦於以下問題:PHP post::sanitize方法的具體用法?PHP post::sanitize怎麽用?PHP post::sanitize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類post
的用法示例。
在下文中一共展示了post::sanitize方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: post
init_var($_POST['btn_submit']);
require 'components/query_string_standard.php';
require 'subclasses/post.php';
$dbh_post = new post();
$object_name = 'dbh_post';
require 'components/create_form_data.php';
extract($arr_form_data);
if ($_POST['btn_cancel']) {
log_action('Pressed cancel button', $_SERVER['PHP_SELF']);
redirect("listview_post.php?{$query_string}");
}
if ($_POST['btn_submit']) {
log_action('Pressed submit button', $_SERVER['PHP_SELF']);
$file_upload_control_name = 'attach_file';
require 'components/upload_generic.php';
$message .= $dbh_post->sanitize($arr_form_data)->lst_error;
extract($arr_form_data);
if ($dbh_post->check_uniqueness($arr_form_data)->is_unique) {
//Good, no duplicate in database
} else {
$message = "Record already exists with the same primary identifiers!";
}
if ($message == "") {
$dbh_post->add($arr_form_data);
redirect("listview_post.php?{$query_string}");
}
}
}
require 'subclasses/post_html.php';
$html = new post_html();
$html->draw_header('Add Post', $message, $message_type, TRUE, TRUE);