F
F
Fl_SparkyBooMan2018-08-23 18:36:55
CMS
Fl_SparkyBooMan, 2018-08-23 18:36:55

How to transfer PHP variables without losing them?

For some reason, you have to write a simple CMS, but without a database. There is an admin.php file in which the admin panel is written, there is also a send.php file - this is the file in which the data entered in the admin panel should be displayed (admin.php file). The data is entered into the form on the page (there are two forms) admin.php and sent by a post request again to the same page, after that, when the data is received by the post request, they are written to the session. After that, in the send.php file, these data are output from the session. The data when sent is displayed in the post request, displayed in the session, sent to the send.php page. But when, after submitting the form, refresh the page or go to another page, the data in send.php disappears.
The structure of actions is as follows:
A session is created in the admin panel (file admin.php), the file already has a form for sending data using the post method to itself (this is necessary so that it does not redirect to the request sending page), i.e. data is entered in the admin file and processed there. After the form is submitted, the data entered in the form is assigned to the session variables, i.e. POST is written to SESSION. These variables are now displayed in the send.php file.
But here's the problem, when the admin.php page is updated, the data both on the page itself and on the send.php page disappear. How to fix it?
Here are the files, they did not fit here, please help, I will be grateful for the answers !!!
https://dropmefiles.com/Xo2fd

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question