search

Home  >  Q&A  >  body text

homework answers questions

If you have any homework answers, please refer to them

girlgirl2661 days ago1476

reply all(3)I'll reply

  • 红红火火恍恍惚惚

    红红火火恍恍惚惚2019-10-08 23:29:23

    HTML page

    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8" >
    <title>Achievements</title>
    </head>
    <body>
    <form action="cjpd.php" method="POST">
    <input type="text" name="num1" value="Enter fractions here"
    onfocus="if (value=='Enter fractions here')value='%

    reply
    0
  • phpcn_u15277

    phpcn_u152772017-08-15 13:12:43

    html page

    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <title>Document</title>
    </head>
    <body>
    <form action="reg.php">
    Name:<input type="text" name = "username"></br>
    Password: <input type="text" name = "password"></br>
    <input type="submit" value = "Submit">

    </form>
    </body>
    </html>

    PHP code:

    <?php
    $u = $_GET["username"];
    echo $u;
    ?>

    Click submit in the html page and want to run PHP file, but the result is that the PHP file was downloaded. I would like to ask what happened?

    reply
    0
  • ringa_lee

    Your form is submitted via POST, why does PHP use GET to receive it?

    ringa_lee · 2017-08-15 13:18:37
    girl

    I didn't write the submission method. If I didn't write it, wouldn't it be the default get method?

    girl · 2017-08-15 13:22:15
  • ringa_lee

    ringa_lee2017-08-15 13:04:40

    You can post your question and we can refer to it together

    reply
    1
  • Cancelreply