On Fri, 23 Feb 2001 16:52, W.D. wrote:
> <form method="POST" action="<?php print ($PHP_SELF);?>">
> First Name: <input type=TEXT name="FirstName" size=15><p>
> Last Name: <input type=TEXT name="LastName" size=25><p>
> E-mail Address: <input type=TEXT name="Email" size=25><p>
> <textarea name="Info" rows="5" cols="40" wrap=SOFT>Ask a
> Question</textarea><p>
> <input type=SUBMIT> <input type=RESET>
> </font>
> </form>
>
>
> <?php
> $from = $FirstName ." ". $LastName;
> $subject = $Email;
> $message = $Info;
> mail("[EMAIL PROTECTED], [EMAIL PROTECTED], $subject, $message,
> $from); ?>
>

You seem to have gotten a little confuzzed here! $from should contain the 
email address which you are collecting as $Email and presumably $Info is 
the message body and I'm not quite sure what you want in the subject, but 
all you have available is first and last names!

And then, you need a check to see what action should be taken when you 
call this script - at the moment every time you open the script you send, 
or try to send, an empty mail. Perhaps assigning a name and value to your 
submit button and testing for that?

-- 
David Robley                        | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES  | http://www.nisu.flinders.edu.au/
AusEinet                            | http://auseinet.flinders.edu.au/
            Flinders University, ADELAIDE, SOUTH AUSTRALIA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to