Answer the question
In order to leave comments, you need to log in
How to add captcha to script?
Hello, there is a Php form script that sends several fields to the mail:
<?php
if($_POST['submit']) {
$fio = substr(htmlspecialchars(trim($_POST['fio'])), 0, 1000);
$email = substr(htmlspecialchars(trim($_POST['email'])), 0, 1000000);
$from = 'form';
$to = 'bla [email protected]';
mail($to, "Имя: ".$fio, "Телефон: ".$email, 'From: '.$from);
echo 'Заявка отправлена! Через 5 секунд вы вернетесь на главную страницу';
header( 'Refresh: 5; url=/' );
}
?>
<form action="send.php" method="post" name="contact_form" onsubmit="return validate_form ( );">
<input type="number" name="email" placeholder="Телефон" class="form-control" id="phone">
<br>
<input type="text" name="fio" placeholder="ФИО" class="form-control">
<br><br>
<input type="submit" name="submit" class="btn-theme btn-theme-sm btn-default-bg text-uppercase" value="Узнать цену">
</form>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question