Answer the question
In order to leave comments, you need to log in
Why is the value not being passed via POST?
I welcome all
There is a form:
<form action="/mailer.php" method="post">
<input type="text" name="name" placeholder="Введите имя"><br/>
<input type="text" name="phone" placeholder="Введите телефон"><br/>
<input type="hidden" name="target">
<input type="hidden" name="form_info">
<input id="2check2" name="2check2" type="hidden" value="" />
<button type="submit" onclick="document.getElementById('2check2').value = 'posr';">Отправить!</button>
</form>
session_start();
if ($_POST['2check2'] != 'posr')
die('<strong>Ошибка</strong>: Защита от спама.');
if (isset($_POST['phone']) || isset($_POST['email'])){
$signing = '';
if($_SESSION['utm_source']) {
$signing .= 'utm_source: '.$_SESSION['utm_source'].'<br>';
}
......
Answer the question
In order to leave comments, you need to log in
Do three forms on the same page have the same field ID?
this can lead to unexpected results when querying DOM elements by id...
id must be unique...
Dump $_POST at the beginning of the php file, you will see what is the difference in your data, you will understand where to dig.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question