[Fri Dec 22 21:07:34.386230 2017] [lsapi:notice] [pid 21650] [client ********] [host *****] Backend log: PHP Notice: Undefined index: tel in /var/www/*****/data/www/*****/send.php on line 6\n, referer: http://*****/form.html
[Fri Dec 22 21:07:34.386279 2017] [lsapi:notice] [pid 21650] [client ********] [host *****] Backend log: PHP Notice: Undefined index: website in /var/www/*****/data/www/*****/send.php on line 7\n, referer: http://*****/form.html
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://server.com/index.php');
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Нужно явно указать, что будет POST запрос
curl_setopt($ch, CURLOPT_POST, true);
// Здесь передаются значения переменных
curl_setopt($ch, CURLOPT_POSTFIELDS, 's=CURL');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_USERAGENT, 'PHP Bot (http://mysite.ru)');
$data = curl_exec($ch);
curl_close($ch);
?>
if($resultSql){
while ($row = mysqli_fetch_assoc()) {
/****/
}
}
перед самым первым тегом в файле index.html
function sumInit($array, $sum){
static $new = [];
static $result = null;
if(array_sum($new) == $sum){
$result = $new;
}
else{
$max = max($array);
$key_max = array_keys($array, max($array))[0];
if((array_sum($new) + $max) <= $sum){
$new[] = $max;
}
else if((array_sum($new) + $max) > $sum){
unset($array[$key_max]);
}
sumInit($array, $sum);
}
if($result != null){
return $result;
}
}
if(mail($to, $subject, $message, $headers)){
$output = '<script>alert("Ваше сообщение получено, спасибо!");</script>';
}
else{
$output = '<script>alert("Ваше сообщение Не получено!");</script>';
}