So I am creating an application that requires 3 variables to be passed to some page.php.
I need $GET['x'], $GET['y'], and $_GET['z'] to be passed to the page.
I have an if statement that I have created now to catch if any of these 3 vars have not been passed, however I am wondering if it's possible to reload the current page in PHP, appending default values for these variables to the URL.
if(!isset($_GET['x']) || !isset($_GET['y'] || !isset($_GET['z']))
//load currentURL + "?x=1&y=2&z=3";
For example, if someone requests page.php it will automatically change it to page.php?x=1&y=2&z=3.
Thanks in advance! .