Answer the question
In order to leave comments, you need to log in
How to extract $_POST array by elements?
There is a code:
if(isset($_POST['sendmessege'])){
$body = "Пользователь заказал: <br>";
$mail_subject = "Заказ";
$to = "[email protected]";
$mail_headers="content-type:text/html; charset=UTF-8";
foreach($_POST as $key => $array){
$body .= "{$array}<br>";
}
mail($to, $mail_subject, $body, $mail_headers);
}
Answer the question
In order to leave comments, you need to log in
It's not a good approach to POST directly somewhere... I would sanitize first.
But if needed:implode('<br>', $_POST);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question