How to save variable?

Hello! I have a variable which is formed from the database (there is a dependence on the selector), script, 2 POST and 2 forms.
The question is: the second POST request, the variable is lost, it can not be save to POST the queries on it are not affected?
July 2nd 19 at 16:56
1 answer
July 2nd 19 at 16:58
Solution
To save information between requests, using a database or session.
Ie, if I need save the variable name, I can write it as follows:
session_start();
$_SESSION['name']='$name';
- Glennie_Beie commented on July 2nd 19 at 17:01
: Yes, not '$name' and $name. - Kenyatta commented on July 2nd 19 at 17:04

Find more questions by tags PHP