V
V
Vladimir Litvinov2017-01-06 13:03:28
PHP
Vladimir Litvinov, 2017-01-06 13:03:28

How to disable links in PHP?

The site has a feedback form, there is a code for processing it:

<?php
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$message = $_REQUEST['message'];
$headers= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html;charset=utf-8 \r\n";
$headers .= "From: От кого письмо <[email protected]>\r\n";

$sub = "У тебя новая заявка";
$message = "<p><strong>Имя:</strong> $name</p>
<p><strong>Email:</strong> $email</p>
<p><strong>Сообщение:</strong> $message</p>"; 
 $send = mail( "[email protected]", $sub,
 $message, $headers );
 header( "Location: thanks.html");
?>

How to forbid entering links in the message field? You need to put the php request in the php. Need protection from advertisers.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rurik Rostislavich, 2017-01-06
@snipeer777

filter.filters.sanitize.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question