本文整理汇总了PHP中FormProcessor::RequiredFields方法的典型用法代码示例。如果您正苦于以下问题:PHP FormProcessor::RequiredFields方法的具体用法?PHP FormProcessor::RequiredFields怎么用?PHP FormProcessor::RequiredFields使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FormProcessor
的用法示例。
在下文中一共展示了FormProcessor::RequiredFields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dirname
include_once dirname(__FILE__) . '/includes/view.php';
include_once dirname(__FILE__) . '/includes/mysql.php';
$visibility = visibility('mysql', $_SESSION['prescan_error']);
//pedefined
$database_host = '';
$database_name = '';
$database_username = '';
$database_password = '';
if ($_POST['forms'] == 'mysql') {
//get all vars
foreach ($_POST as $key => $value) {
${$key} = $value;
}
//_________check if form filled in________
$process = new FormProcessor();
if (!$process->RequiredFields('all')) {
$notifications = 1;
$notice = "Error! - Fill in all form fields";
$proceed = false;
} else {
//______check connection_____
$dbase = new QuickMysql($database_name, $database_username, $database_password, $database_host);
if ($dbase->obj_status) {
//_______loadup mysql file_________
$mysql_file = SETUP_PATH . '/mysql.sql';
$file_content = file($mysql_file);
$query = "";
$error_count = 0;
foreach ($file_content as $sql_line) {
if (trim($sql_line) != "" && strpos($sql_line, "--") === false) {
$query .= $sql_line;