form method="POST" not working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • adrianchew
    Senior Member
    • Feb 2001
    • 188
    • 3.0.9

    form method="POST" not working

    I'm scratching my head over this one. I have a PHP script that calls itself in its form action, and I specify method="POST" but it will do a GET instead and pass on the variables in the URL.

    Note the form is called up with GET with a variable...

    Eg.

    Code:
    [url=http://www.site.com/script.php?action=displayform]www.site.com/script.php?action=displayform[/url]
    Which will display a form that includes say for example...

    Code:
    <form action="script.php" method="POST">
    <input type="hidden" name="var1" value="1">
    <input type="hidden" name="var2" value="2">
    <input type="submit" value="submit">
    </form>
    Which results it in using method GET and doing this to the URL...

    Code:
    www.site.com/script.php?var1=1&var2=2
    Why is it doing a GET instead of a POST?
    vB 3.6.4 (No hacks), RedHat Enterprise 3 (+hotfixes), Lighttpd 1.4.13, PHP 5.2.1 (FastCGI, gzip), MySQL 4.1.21, P4 2.0GHz, 512MB RAM, 80GB IDE disk
  • adrianchew
    Senior Member
    • Feb 2001
    • 188
    • 3.0.9

    #2
    Never mind - this is what happens when you're working with someone else's HTML code that's messed up!
    vB 3.6.4 (No hacks), RedHat Enterprise 3 (+hotfixes), Lighttpd 1.4.13, PHP 5.2.1 (FastCGI, gzip), MySQL 4.1.21, P4 2.0GHz, 512MB RAM, 80GB IDE disk

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...