Support » Plugins and Hacks » Hacks » "action" parameter in forms

  • Is it OK to use the following code in forms?

    <form action="http://'. $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"] .'" method="post">

    Thanks.

    ———
    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).

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"action" parameter in forms’ is closed to new replies.