TLDR:- What is a good way to pass contents of a variable
from one PHP file
to another without involving a form
, link
or a button
.
Question:-
So there is a form
in a page/file called question_edit_form.php
and its action
attribute is already set to another file called question.php
. The variable of interest is being read-in from the user in question_edit_form.php
and is then obviously being sent to question.php
using $_POST
.
Now, there is a third file, named renderer.php
, and which is not linked to the other two files. I want to use that variable of interest in this file. So how can I access that variable which is set in question.php from inside renderer.php?