Is there a way to run a second PHP file from the first file ?
example i wam running a.php and from the foreach loop, the var is past to b.php using POST function..
Is there a way to run a second PHP file from the first file ?
example i wam running a.php and from the foreach loop, the var is past to b.php using POST function..
You can always use include
and you do not have to POST a variable, an included PHP file runs in the same scope as the including file (there's no HTTP request being made).
You don't need to pass it with GET. You can just use include('path/to/file.php')
. That calls that file, and PHP acts as though the contents of that file were right there in the current one.