L
L
leni_m2017-06-14 15:49:09
PHP
leni_m, 2017-06-14 15:49:09

How to save a part of the HTML page with the entered data to the computer?

Wrote a page where the user enters data. I want to make sure that when the button is clicked, a file with this form and the data that he entered is saved on his computer.
There was an idea to convert from html to pdf, but I could not figure out the scripts that I found.
Can someone tell me the already trodden path or algorithm of actions?
I will also make buttons "print" and "send by mail"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Korobkov, 2017-06-14
@leni_m

It is more correct to send data to the server, save it to the database, generate pdf (for example, in php) and download.

V
vyrkmod, 2017-06-14
@vyrkmod

Having received the form on the server, we return the same html by filling in the fields. Before the output, insert After receiving this header, the browser will offer to save the page. header('Content-disposition: attachment');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question