Is it OK to use the following code in forms?
<form action="http://'. $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] .'" method="post">
I am not using action=”options.php” because it does not work for me. Previously I was using
<form action="<?php $_SERVER['PHP_SELF']; ?>?page=myplugin" method="post">
but it turned out that it does not work on some webhosts that allow “multihosting” via domain aliases and special folders for each domain (the form was sent to a nonexistent URL).
- The topic ‘"action" parameter in forms’ is closed to new replies.