Answer the question
In order to leave comments, you need to log in
How to build a base?
Good afternoon.
Please tell me how to make the send.php file collect data in an exel file?
send.php file code (ajax form)
<?
$to = '[email protected]'; //Почта получателя, через запятую можно указать сколько угодно адресов
$subject = ''.$_POST['form'].''; //Загаловок сообщения
$message = '
<html>
<head>
<title>'.$subject.'</title>
</head>
<body>
<p>Имя: '.$_POST['qname'].'</p>
<p>Телефон: '.$_POST['qtel'].'</p>
<p>e-mail: '.$_POST['cmail'].'</p>
<p>Время: '.$_POST['ctime'].'</p>
</body>
</html>'; //Текст нащего сообщения можно использовать HTML теги
$headers = "Content-type: text/html; charset=utf-8 \r\n"; //Кодировка письма
$headers .= "From: Отправитель <[email protected]>\r\n"; //Наименование и почта отправителя
mail($to, $subject, $message, $headers); //Отправка письма с помощью функции mail
?>
Answer the question
In order to leave comments, you need to log in
In fact, everything is simple. But it will take a very long time for you. But what an experience.
Here is an example of a practical lesson on phpexcel . You will just need to pass the desired values and paste them into the cells of the created page in excel.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question