Form action to load same page doesn't work
-
I have been trying to have WP load the same page using SELF_PHP, REQUEST_URI, empty string etc but none seems to work. Using a full path of a .php file in the action works but I need to have it work for an html page (https://example.com/page_id=xx). The theme is “startupWP”.
I get the following message:
Not Found
Nothing found for the requested page. Try a search instead?Code block:
<form action="" method="GET"><input type="TEXT" name="name"> <?php echo("https://"."$_SERVER[HTTP_HOST]"."$_SERVER[REQUEST_URI]"); ?>
I printed out the following to test.
$SELF_PHP prints empty string
$_SERVER[REQUEST_URI] prints ?page_id=xx
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Form action to load same page doesn't work’ is closed to new replies.