Answer the question
In order to leave comments, you need to log in
How to put the execution of the php script through the form?
Good afternoon! Let's get straight to the point:
There is this code:
<form action="mail/mail.php" method="post" >
<div class="input-dark">
<i style="font-size:24px" class="fa"></i>
<input type="text" name="phone1" value="" placeholder="Введите номер телефона" data-mask="phone" />
</div>
<input type="submit" value="Получить расчет" />
</form>
<?PHP
$phone = $_POST['phone1'];
$phone = htmlspecialchars($phone);
$phone = urldecode($phone);
$phone = trim($phone);
mail("[email protected]", "Новая заявка", " Телефон: ".$phone.") or die("Error");
header('Location: https://i.imgur.com/yTjeLaN.jpg');
?>
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