You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

65 lines
1.8 KiB

<?php
//Function to filter the form input
function user_input( $data ) {
$data1 = trim($data);
$data2 = stripslashes($data1);
$data3 = htmlspecialchars($data2);
return $data3;
}
$accounttype = user_input($_POST["accounttype"]);
$accountid = user_input($_POST["accountid"]);
#$accountid = $accounttype . $accountid;
$pwd = user_input($_POST["pwd"]);
$name = user_input($_POST["name"]);
$tel = user_input($_POST["tel"]);
$address = user_input($_POST["address"]);
$email = user_input($_POST["email"]);
$lineid = user_input($_POST["lineid"]);
$wechatid = user_input($_POST["wechatid"]);
$phone_call_help = user_input($_POST["phone_call_help"]);
$chat_for_help = user_input($_POST["chat_for_help"]);
$remote_help = user_input($_POST["remote_help"]);
$repairerid = user_input($_POST["repairerid"]);
$manager = user_input($_POST["manager"]);
$department_id = user_input($_POST["department_id"]);
$role_id = user_input($_POST["role_id"]);
$creater = user_input($_POST["creater"]);
$create_at = date('Y/m/d H:i:s');
/*
if(empty($_POST["name"])) {
$name_error = "Name is required";
} else {
$name = user_input($_POST["name"]);
if(!preg_match("/^[a-zA-Z ]*$/", $name)) {
$name_error = "Only letter and white space are allowed";
}
}
/*
if(empty($_POST["website"])) {
$website_error = "Website address is required";
} else {
$website = user_input($_POST["website"]);
if(!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i", $website)) {
$website_error = "Invalid website URL";
}
}
if(empty($_POST["comment"])) {
$comment = "";
} else {
$comment = user_input($_POST["comment"]);
}
*/
?>