php - Include file while passing GET Values in while loading?
887
I have a file which i created that requires you to pass in a specific key in order to load the full page, otherwise it will give you an error.
That all works great but i have another page where if you submit the form it will include the file which requires GET values, how do i go about doing this?
I tried:
include 'schedulechecker.php?key=1233key';
Answer
Solution:
using GET values in include is not possible include does't use an http request it just gets the contents of the file and includes it in
you can use a variable and pass using it
if you want to use get values for that file as well
just use another variable in shedulechecker.php and assign the value after checking if
$_GET['key']
existAnswer
Solution:
It is not pssible to pass your parameter using
GET
withinclude
You can do something like below.Now you can use
$key
in yourschedulechecker.php
file.