|
Posted by Andy Hassall on 11/06/06 16:45
On 6 Nov 2006 08:06:32 -0800, "laredotornado@zipmail.com"
<laredotornado@zipmail.com> wrote:
>Hi, I'm using PHP 4.4.4 and have downloaded the free script
>formmail.php (version 4.1b). Wondered if anyone had experienced the
>same problem I'm having. I'm submitting a form to formmail.php, but
>none of the variables seem to be getting recognized. Here is part of
>the form I'm submitting ...
>
><body onload="document.forms[0].submit();">
>Sending Order ...
>
><form action="formmail.php" method=post
>enctype="application/x-www-form-urlencoded">
> <INPUT TYPE="hidden" NAME="subject" VALUE="Order for Coffee">
> <INPUT TYPE="hidden" NAME="redirect" VALUE="thanks.html">
> <INPUT TYPE="hidden" NAME="recipient"
>VALUE="laredotornado@gmail.com">
>...
></form>
></body>
>
>
>but then I get warnings like below ...
>
>Notice: Undefined variable: recipient in
>/usr/local/apache2/htdocs/andersonscoffee/formmail.php on line 365
>
>but as you can see above, "recipient" and "email" are clearly defined.
They're not clearly defined at all. They're in your form, but that doesn't
mean there will be a $recipient variable.
The script should be looking in $_POST['recipient'], etc., and if it's not,
then it's assuming the deprecated and potentially dangerous "register_globals"
option is on (search the manual or Google for more info), and so the script is
very old and hasn't been updated for the past several years of changes in PHP.
--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
[Back to original message]
|