Answer the question
In order to leave comments, you need to log in
How to save HTML form content to txt file on server side?
Hello. I decided to write some kind of site, I figured out everything related to html, but I just can’t figure out how to save the contents of the file to a txt file, and so that it is saved on the server side
Answer the question
In order to leave comments, you need to log in
well done what the phishing site did and wrote about it here, you should not continue working on it because the part that does not sit behind aluminum pans sits behind phishing sites, and with your skills you will not go far
And what exactly is the problem? Convert the resulting form to JSON and safely save yourself to a text file.
<?php
$json = json_encode($_POST);
$size = file_put_contents('form.txt', $json);
echo 'Сохранено '.$size.' байт текста';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question