Re: METHOD=POST not worikng

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



IraqiGeek wrote:
On Sunday, May 14, 2006 2:01 AM GMT,
chris smith <dmagick@xxxxxxxxx> wrote:

On 5/14/06, IraqiGeek <geek@xxxxxxxxxxxxx> wrote:

On Saturday, May 13, 2006 4:59 PM GMT,
ray.hauge@xxxxxxxxxxxxxxxxxxxxxxx
<ray.hauge@xxxxxxxxxxxxxxxxxxxxxxx> wrote:

AFAIK it should be working just fine.  I'm not aware of POST not
working in any circumstance other than PHP not working at all.

Can you post your test script?  We could better judge what's
happening based off that.  Just make sure you're referencing the
variables with $_POST or $_REQUEST, not $_GET.

Slightly off topic.  If you're not already, always make sure to
verify/escape your input from POST/GET/RSS/etc.  That will help make
your pages more secure.  It might seem like you don't need to do it
right now at the beginning, but it's a good habit to get into... One
that I need to follow better (especially when I have a really short
deadline).

Ray


PHP is indeed working. If I use METHOD=GET instead of POST, the
script works without any issues. Here is the test script I'm using:
<html>
<title>test script</title>
<body>
<?php
        //If the user wants to add a joke
        if(isset($_GET['addtext'])):


You're checking for a get string here, not a post string. So it will
never get into this part of the code.


I have tried _POST here, and when its then that I won't be able to get into
the part of the code that I want to get into. $addtext is passed through an
HREF tag, not through the form.

Sorry, missed that bit.

First step before using a debugger, add:

echo "<pre>"; var_dump($_POST); echo "</pre>";

somewhere in your code and go from there.

--
Postgresql & php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux