I use the code to post as the header:
$fullurl=$_SERVER['PATH_INFO']; echo ' <form action="'. $fullurl .'" method="POST"> <table width="1000" border="1" cellpadding="10" id="navigationBar"> <tr> <td> <a href="/PoliticalForum/Registration.php">Register</a></td> <td> <a href="/PoliticalForum/controlPanel.php">Control Panel</a></td> <td> <a href="/PoliticalForum/checkEmail.php">Donate</a> </td> <td align="right">name:<input name="name" type="text" /></td> <td>password:<input name="pass" type="text" /> <input name="login" type="submit" value="Login" /> </td> </tr> </table> </form> ';
I include the header in the request page files once. I want the fullurl variable to get the full URL of the page to which it was "required_once", and when I click the "Submit" button, I want it to be redirected to the page where the header is included. I added the url to the form action.
But I get the following:
Undefined index: PATH_INFO
I tried using them instead:
explode('/', substr(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH),1)); $_ENV['PATH_INFO'];
But they did not work either: (
source share