I want to write the form content submitted in php to different files. I am still working on that message board. I want to save different messages to different texts. & nbsp; however, after the submitted form is submitted, a PHP file will be executed every time. I want to execute this php file once, and there is a variable in it that will be incremented, & nbsp; which variable in php can implement this function ?? & Nbsp; how can I pass the variable of a php file to another php file in php? Thank you for writing the form content submitted in php to different files.
I am still working on the message board. I want to save different messages to different texts.
However, after the submitted form is submitted, a PHP file will be executed every time,
There is a variable in it that is incremented,
Which variable in php can implement this function ??
In addition, how can I pass the variable of a php file to another php file in php?
Thank you! I am too unfamiliar with php.
------ Solution --------------------
Save the variable in the database or memcache.
------ Solution --------------------
Global variables
Session_start ();
$ _ SESSION ['var'] = $ _ SESSION ['var'] + 1;
You can use cookies if most of the data is used.
If the data volume is large, you can use the database.