Posted by ZeldorBlat on 11/06/06 16:28
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
>
> Notice: Undefined variable: required in
> /usr/local/apache2/htdocs/andersonscoffee/formmail.php on line 383
>
> Notice: Undefined variable: require in
> /usr/local/apache2/htdocs/andersonscoffee/formmail.php on line 388
>
> Notice: Undefined variable: email in
> /usr/local/apache2/htdocs/andersonscoffee/formmail.php on line 429
>
> but as you can see above, "recipient" and "email" are clearly defined.
> What am I doing wrong?
>
> Thanks, - Dave
The script you've downloaded likely requires register_globals to be
enabled (bad) and your server has it disabled (good). Either turn it
on in php.ini (bad) or get a newer version of the script that doesn't
require it (good). If there isn't a version of formmail.php that
doesn't require register globals then I'd look for another script.
[Back to original message]
|