P
P
pavvel22016-01-04 18:19:23
PHP
pavvel2, 2016-01-04 18:19:23

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
?>


Gather qname and qtel data

. Thanks in advance.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dima Pautov, 2016-01-04
@bootd

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.

R
romy4, 2016-01-04
@romy4

see excel libraries

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question