Data not passed to PHP file after submit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    #1

    Data not passed to PHP file after submit

    I am a newbie in PHP. I am using PWS as my server. I enter data in
    addToForm.html file and then click the submit button, but the
    processForm.php file always indicate that the variables are empty. It
    appears as if the data is not passed to processForm.php file. Please
    help.


    addToForm.html
    <html>
    <head>
    <title>add to Form</title>
    </head>
    <body>
    <form action="process Form.php" method="get">
    Enter your name:
    <input type="text" name="userName" ><br>
    Where do you live?
    <input type="text" name="region">< br>
    <input type="submit" name="submit">
    </form>
    </body>
    </html>
    -----------------------
    processForm.php
    <html>
    <head>
    <title>Proces s Form Data</title>
    </head>
    <body>
    <?php
    print "Thank you $userName<br>";
    print "You live in: $region";
    ?>
    </body>
    </html>
    -------------------
    And the output is as follows.

    Notice: Undefined variable: userName in
    C:\Inetpub\wwwr oot\visual\proc essForm.php on line 10
    Thank you

    Notice: Undefined variable: region in
    C:\Inetpub\wwwr oot\visual\proc essForm.php on line 11
    You live in:
  • Alan Little

    #2
    Re: Data not passed to PHP file after submit

    Carved in mystic runes upon the very living rock, the last words of John of
    comp.lang.php make plain:
    [color=blue]
    > I am a newbie in PHP. I am using PWS as my server. I enter data in
    > addToForm.html file and then click the submit button, but the
    > processForm.php file always indicate that the variables are empty. It
    > appears as if the data is not passed to processForm.php file. Please
    > help.[/color]

    I don't know about PWS, but for IIS, file upload is not enabled by default.
    You might want to inquire about that in an MS group.

    --
    Alan Little
    Phorm PHP Form Processor

    Comment

    Working...