Main content
<?php
echo $test;
include "index.php?test=solved";
echo $test; // expected: "solved"
if (isset($_get["test"])){
$test = $_get["test"];
}
?>
File ends here
error starts here.
Notice: Undefined variable: test in C:\-------\XAMPP\htdocs\index.php on line 4
Warning: include(index.php?test=solved): failed to open stream: No error in C:\-------\XAMPP\htdocs\index.php on line 5
Warning: include(): Failed opening 'index.php?test=solved' for inclusion (include_path='.;C:\-------\XAMPP\php\PEAR') in C:\-------\XAMPP\htdocs\index.php on line 5
Notice: Undefined variable: test in C:\-------\XAMPP\htdocs\index.php on line 6
What I actually try to achieve is retrieve data from same file, by using specific parameters.