Please Help check this contact form Cpanel
Please is this contact form safe from hackers and spammer from inputting code that code affect my cPanel or whm please help check thanks Guys.
Contact
== "POST") {
$code1= trim(preg_replace(array("`'`", "`[^a-z0-9]+`"), array("", ""), strtolower(test_input($_POST['code'>))), "-");
$code1 = substr($code1, 0, 10);
$code= trim(preg_replace(array("`'`", "`[^0-9]+`"), array("", ""), strtolower(bin2hex(test_input($_POST['code1'>)))), "-");
$code = substr($code, 0, 10);
if (filter_var(test_input($_POST['mail'>), FILTER_VALIDATE_EMAIL)) {
if(strlen(test_input($_POST["message">)) > 5){
$email_sumbit = test_input($_POST['mail'>);
$contact_name = test_input(filter_spam($_POST['name'>));
$subject_submit = test_input($_POST['head'>);
$message_submit= test_input($_POST["message">);
if($code1!== $code)
{ } else {
$from = "$email_sumbit";
$to_email = "mail@example.com";
$subject = $subject_submit;
$message = $message_submit;
$headers = "From: $contact_name $from";
mail($to_email,$subject,$message,$headers);
$sent_show_response = 'Your message has been sent successfully';
$message_sent_remove_form = "1";
}
}}
if ($_SERVER["REQUEST_METHOD"> == "POST") {
if($sent_show_response){
$sent_show_response = $sent_show_response; } else {
if(strlen(test_input($_POST["message">)) < 5){
$sent_show_response = 'Your message is too short'; } else{
$sent_show_response = 'Please provide valid information
';
}}}}
?>
);?>"> Full name: E-mail address: Subject: Message: <?php echo $message_submit;?> Human verification:
CODE
Send Message
Please sign in to leave a comment.
Comments
0 comments