GetDotted Domains

Viewing Thread:
"Sending e-mails from html forms..."

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 01/08/01 at 22:49
Regular
Posts: 787
I know CGI script can be written to send e-mails from user inputs into html forms. This is likely to be a stupid question, but can php do anything similar, what with it being server side as well?
Thu 16/08/01 at 19:49
Regular
"hockeyphotos.com"
Posts: 84
Andrew Hunt wrote:
> I suggest you get:

> PHP: Fast and Easy Web Development

I second that - its an excellent introduction to both PHP and MySQL.

Chris.
Thu 16/08/01 at 19:23
Regular
"Eff, you see, kay?"
Posts: 14,156
SR motto:

"We don't sell turkeys, even at Christmas"
Wed 15/08/01 at 18:26
Regular
"It goes so quickly"
Posts: 4,083
...Any chance of SR selling some PHP books then???
Wed 15/08/01 at 14:56
Posts: 0
Another good book for the more advanced PHP programmer is "Professional PHP Programming" published by Wrox. It's a tad expensive (about £35) but it's prettty good.

I also find some interesting scripts at:
www.phpbuilder.com
www.devshed.com

There is also a good PHP forum at:
http://forums.devshed.com

That's obviously only if you can't find the help here.
Thu 02/08/01 at 22:14
Regular
"It goes so quickly"
Posts: 4,083
TrevUK ... are you familier with HTML and all that??? The input forms, the names of the text boxes, etc???
Thu 02/08/01 at 20:13
Regular
"It goes so quickly"
Posts: 4,083
...sorry, little error there..

where it says..

# The actuall results
$Message = "Submited details:\n\n " &
foreach($HTTP_GET_VARS as $key=>$value) {
$key: $value\n\n
}
& ", sent via HTML Web Form.";


... that should be ...


# The actuall results
$Message = "";
foreach($HTTP_GET_VARS as $key=>$value) {
$Message ."$Key: $Value"
}
Thu 02/08/01 at 18:37
Regular
"It goes so quickly"
Posts: 4,083

$Send_To = "[email protected]";
# The E-mail Address you want the results sent to.

$Sent_From = "My WebSite HTML Form";
# Either an E-mail Address or note, just so you kno where
# the E-mail came from

$Subject = "Filled in HTML Form";
# The Subject line of sent the E-mail

# The actuall results
$Message = "Submited details:\n\n " &
foreach($HTTP_GET_VARS as $key=>$value) {
$key: $value\n\n
}
& ", sent via HTML Web Form.";

mail($Send_To, $Subject, $Message, "FROM:$Sent_From") or print "Error Occured, mail not sent.";
# Sends the E-mailed Results to you, or alerts of an error.
?>





This Script will just send you all th fields that were filled in ... it goes through each field, so you can add or delete any fields on the HTML form, and not have to edit your PHP Script... You should put the method as Postin the
of the HTML form ().

... hope that helped.
Thu 02/08/01 at 18:12
Regular
"It goes so quickly"
Posts: 4,083
ajg >> he did actually onlu ask if it was possible, not for a PHP Script example.... though if you want one... I'll stick it up in a moment...
Thu 02/08/01 at 14:47
Regular
Posts: 612
Books are a good idea. I suggest you get:

PHP: Fast and Easy Web Development

It is the book that I used to learn PHP and it takes you through setting it up on your computer and through basic principles and scripts (includeing a very easy mail script).
Thu 02/08/01 at 10:40
Regular
""
Posts: 303
Great help you guys are. Doesn't take anyone with much knowledge to post a reply to 'read a book'. Whats the point, like?

Anyway...


Trev, whats your email address? I can send you a couple of pages and scripts that'll do the job. It was freeware from somewhere or other but its easy to configure.

cheers
ajg

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Many thanks!!
Registered my website with Freeola Sites on Tuesday. Now have full and comprehensive Google coverage for my site. Great stuff!!
John Shepherd
I've been with Freeola for 14 years...
I've been with Freeola for 14 years now, and in that time you have proven time and time again to be a top-ranking internet service provider and unbeatable hosting service. Thank you.
Anthony

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.