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.
 
 
 
 
 
 

59 lines
1.6 KiB

<?php
//Function to filter the form input
function user_input( $data ) {
$data1 = trim($data);
$data2 = stripslashes($data1);
$data3 = htmlspecialchars($data2);
return $data3;
}
$expert_id = user_input($_POST["expert_id"]);
$personal_id = user_input($_POST["personal_id"]);
$name = user_input($_POST["name"]);
$title = user_input($_POST["title"]);
$major = user_input($_POST["major"]);
$tel = user_input($_POST["tel"]);
$tel_count = user_input($_POST["tel_count"]);
$chat_id = user_input($_POST["chat_id"]);
$chat_count = user_input($_POST["chat_count"]);
$video_call = user_input($_POST["video_call"]);
$video_count = user_input($_POST["video_count"]);
$onsite_call = user_input($_POST["onsite_call"]);
$onsite_count = user_input($_POST["onsite_count"]);
$creater = user_input($_POST["creater"]);
$create_at = user_input($_POST["create_at"]);
/*
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"]);
}
*/
?>