|
Posted by Neredbojias on 02/05/06 21:35
With neither quill nor qualm, Toby Inkster quothed:
> Paul Watt wrote:
>
> > Can anyone recommend a good PHP form processor? Basically I want to design a
> > form and have the results sent to a php script to email back to me.
>
> For the most part, PHP form to mail stuff is so easy that it's not worth
> using a third-party one.
>
> e.g.
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
> <title>PHP Mail Example</title>
> <h1>PHP Mail Example</h1>
> <?php
> $myaddress = 'me@example.org';
> $mysubject = 'Feedback from website';
>
> if ( isset($_POST['message']) )
> {
> $mymessage = "IP: {$_SERVER['REMOTE_ADDR']}\r\n"
> . "Browser: {$_SERVER['HTTP_USER_AGENT']}\r\n\r\n"
> . stripslashes($_POST['message']);
>
> if (@mail($myaddress, $mysubject, $mymessage))
> print "<p>Mail send successfully!</p>\n";
>
> else
> print "<p>Failed! Please try again later.</p>\n";
> }
> ?>
> <form action="<?= $_SERVER['PHP_SELF'] ?>" method="post">
> <div>
> <textarea rows=10 cols=60 name="message"></textarea>
> <br>
> <input type="submit" value="Send Mail">
> </div>
> </form>
All right, realize you are hearing from a bloke who has yet to produce a
successful form, but that example certainly looks dubious, too. Where's
the <body> and <html> tags among others, and what about email-address
spam bots? I'd really _like_ to have a good, successful email form in
my possession but don't think I can stand any more rejection...
--
Neredbojias
Contrary to popular belief, it is believable.
[Back to original message]
|