PHP and mail forms
| From: | Phil Matt | Date: | Fri, 30 Jan 2004 16:18:05 +0000 |
| Subject: | PHP and mail forms | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-32716@lists.php.net to get a copy of this message | ||
Ricardo Lopes wrote:
> There are several ways to do this.
> Some people like the approach:
>
> if ($submit) { send_email(); }
>
> or you can put a hidden field in your form, like op:
>
> <input name="op" type="hidden" id="op" value="send"
> />
>
> and use:
>
> if (isset($HTTP_GET_VARS['op']) && ($HTTP_GET_VARS['op'] ==
> 'send'))
> {
> send_email();
> }
Thanks again, Ricardo. I now have the form communicating with the server.
I think that I might have an error in my script:
Where I join together the value of the passed variable ("$myrow[3]") and the string
containing the domain ( $string="@somedomain.com") I used:
$to_name="$myrow[3]$string"
If the passed variable's value is, for instance, "smith", then does my $to_name
become:
smith@somedomain.com
On hitting the submit button, I see the server being called and data being sent, but
nothing is being received. I'm just wondering if I've appended those two things correctly.
TIA for your continued assistance.
Cheers --- Phil