Home>

I can't get $_GET well with PHP.

I am using Wordpress to create a registration form using external PHP.
I'm having trouble getting $_GET well in the course of that experiment.


Create a short code with the Wordpress function ...

<? php
function registerform () {
    echo '
        <form action = "// hogehoge.com/wp-content/themes/ALC/system/register.php" method = "post">
            <label>email address</label><br>
            <input type = "email" name = "email-address" value = "" placeholder = "[email protected]"><br>
            <label for = "uname">User ID</label><br>
            <input type = "text" name = "name"><br>
            <label for = "nickname">Nickname</label><br>
            <input type = "text" name = "nickname"><br>
            <label for = "comment">Comments</label><br>
            <input type = "text" name = "comment"><br />
            <label>Password</label><br>
            <input type = "password" name = "passward" value = "" maxlength = "8" placeholder = "Enter with ~ 8 characters"><br>
            <label for = "passwordConfirm">Password (Confirm)</label><br>
            <input type = "password" name = "passwordConfirm" required><br>
            <label>Birthday</label><br>
            <input type = "date"><br>
            <input type = "submit" value = "Register">
        </form>
        <script>
          var form = document.forms [0];
          form.onsubmit = function () {
            // clear error message
            form.password.setCustomValidity ("");
            // Confirm password match
            if (form.password.value! = form.passwordConfirm.value) {
              // If it doesn't match, display an error message
              form.password.setCustomValidity ("Password and confirmation password do not match");
            }
          };
          // Processing when an input value check error occurs
          form.addEventListener ("invalid", function () {
            document.getElementById ("errorMessage"). innerHTML = "There is an error in the input value";
          }, false);
        </script>
    ';
}
add_shortcode ('registerform', 'registerform');


Paste it into the "post" you created and write the information on the post page…

Send to the following PHP file.
If i like it, the contents described in the "Comments" will be displayed, and after that, you should be able to come out.

<? php
$comment = $_GET [‘comment’];
echo $comment;
echo 'Doraemon';

Please tell me what this is and where you overlooked it.