本文整理汇总了PHP中validate::add方法的典型用法代码示例。如果您正苦于以下问题:PHP validate::add方法的具体用法?PHP validate::add怎么用?PHP validate::add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类validate
的用法示例。
在下文中一共展示了validate::add方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extract
//$message .= $dbh_citizen->sanitize($arr_form_data)->lst_error;
$arr_error = $dbh_citizen->sanitize_new($arr_form_data)->lst_error;
extract($arr_form_data);
if ($dbh_citizen->check_uniqueness($arr_form_data)->is_unique) {
//Good, no duplicate in database
} else {
$message = "Record already exists with the same primary identifiers!";
}
if ($message == "" and empty($arr_error)) {
$dbh_citizen->add($arr_form_data);
$citizen_id = $dbh_citizen->auto_id;
require_once 'subclasses/validate.php';
$dbh_citizen = new validate();
for ($a = 0; $a < $validate_count; $a++) {
$param = array('proof_of_id' => $cf_validate_proof_of_id[$a], 'proof_of_address' => $cf_validate_proof_of_address[$a], 'citizen_id' => $citizen_id, 'status' => $cf_validate_status[$a]);
$dbh_citizen->add($param);
}
require_once 'subclasses/person.php';
$dbh_person = new person();
$dbh_person->add($arr_form_data);
$person_id = $dbh_person->auto_id;
$arr_form_data['person_id'] = $person_id;
require 'password_crypto.php';
//Hash the password using default Cobalt password hashing technique
$hashed_password = cobalt_password_hash('NEW', $password, $username, $new_salt, $new_iteration, $new_method);
$arr_form_data['password'] = $hashed_password;
$arr_form_data['salt'] = $new_salt;
$arr_form_data['iteration'] = $new_iteration;
$arr_form_data['method'] = $new_method;
$arr_form_data['role_id'] = 3;
$arr_form_data['skin_id'] = 1;
示例2: validate
require 'components/query_string_standard.php';
require 'subclasses/validate.php';
$dbh_validate = new validate();
$object_name = 'dbh_validate';
require 'components/create_form_data.php';
extract($arr_form_data);
if ($_POST['btn_cancel']) {
log_action('Pressed cancel button');
redirect("listview_validate.php?{$query_string}");
}
if ($_POST['btn_submit']) {
log_action('Pressed submit button');
$message .= $dbh_validate->sanitize($arr_form_data)->lst_error;
extract($arr_form_data);
if ($dbh_validate->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_validate->add($arr_form_data);
redirect("listview_validate.php?{$query_string}");
}
}
}
require 'subclasses/validate_html.php';
$html = new validate_html();
$html->draw_header('Add Validate', $message, $message_type);
$html->draw_listview_referrer_info($filter_field_used, $filter_used, $page_from, $filter_sort_asc, $filter_sort_desc);
$html->draw_controls('add');
$html->draw_footer();