Forum Moderators: coopster

Message Too Old, No Replies

php form to email (Beginners question)

         

TiNiB

2:02 pm on Nov 24, 2004 (gmt 0)

10+ Year Member



Hi, i would like a very simple form (Name, tel no., email, message)

to be sent to my email address.

so i search the internet for a pice of php code i could use.

I found [thescripts.com...]

When i fill in this form and check my email i get the message:

"Hello ****,
We thank
you again for using our form and telling
us your option
about our site

This is important to us so we can know how
to improve.

Thank you once again.
"

this email displays that it is from CGI-Mailer. I dont know what this is but i would like it to be the email of the companies email address.

How would i do this?

Thanks

eurotrash

2:09 pm on Nov 24, 2004 (gmt 0)

10+ Year Member



Have you thought about using FormMail which can be found at: [scriptarchive.com...]

It is widely used for precisely what you describe and has been for more years than I can remember.

TiNiB

11:25 pm on Nov 24, 2004 (gmt 0)

10+ Year Member



thanks for that link, but it looks very complicated.

Slade

12:09 am on Nov 25, 2004 (gmt 0)

10+ Year Member



FormMail in most(if not all) of its incarnations is banned by most responsible webhosts, it just has too many holes. (I don't know how such a simple concept went so horribly wrong.)

The big deal with form to mail scripts is that there should be no possible way for the script to email anyone other than the email addresses you designate.

Contact your hosting provider, they should be able to point you to a script they allow that should work for you.

Slade

12:24 am on Nov 25, 2004 (gmt 0)

10+ Year Member



I dont know what this is but i would like it to be the email of the companies email address.

Go back and read the URL you posted above. The to your address problem is in there.

eurotrash

12:45 am on Nov 25, 2004 (gmt 0)

10+ Year Member



Sorry for giving bad info.

This is the first I heard of any hosting companies banning FormMail or it's problems. In fact numerous companies I use for hosting actually have the script in their cgi libraries including XO and Genuian.

TiNiB

9:31 am on Nov 25, 2004 (gmt 0)

10+ Year Member



Hi all and thanks for all the relplies.

This is my code:

======================================================

<?

PRINT "Greetings $name, thank you for filling out our";
PRINT "form.";
PRINT "<TABLE border=0 width=500";
PRINT "cellspacing=0 cellpadding=7>"; PRINT "<TR><TD>"; PRINT "In the form, you stated that our site";
PRINT "$status. Thank you for your input."; PRINT "We will send you more information about our site";
PRINT "in an email to $email.";
PRINT "If you have any more comments, feel free to reply.";
PRINT "</TD></TR></TABLE>";

mail("info@example.co.uk", "An Opinion", "$name just
used the form.\n\nThey stated that our site $opinion.", );

?>

======================================================

I would like to impement the following code into it code so that i can get the copanies email address in the "From" part of the email address:

======================================================

mail("bireland@example.com", "the subject", "Line
1\nLine 2\nLine 3", "From: you@example.com\nReply-To:
me@example.com\n);

======================================================

[edited by: coopster at 10:18 pm (utc) on Nov. 25, 2004]
[edit reason] generalized urls [/edit]

TiNiB

1:27 pm on Nov 27, 2004 (gmt 0)

10+ Year Member



Ignore the above post.

I managed to figure it out.

Thanks

jatar_k

7:41 pm on Nov 27, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



a little extra could maybe be found in this thread, just in case

Basics of Submitting and Emailing Forms with PHP [webmasterworld.com]