|
-
Apr 8th, 2006, 02:05 AM
#1
Thread Starter
Junior Member
Sending a Form
I know this has been asked many times, but I could never find a straight answer. I wanted to know how to send a Form of information to my e-mail using PHP. For example I would use textfields in a form to hold inforamtion like there name, e-mail, birth date, etc. How would I send that information to my e-mail address using php?
PS: I'm using dreamweaver, if that helps any.
Thanks,
TheHolyHessiah
-
Apr 8th, 2006, 04:07 AM
#2
Re: Sending a Form
PHP Code:
//get values from submitted form
$name = $_POST['txtname'];
$email = $_POST['txtemail'];
//etc....
//content of email message
$message = $name . " submitted your form with an email address of " .$email;
//Send email
mail("[email protected]","Form Details",$message);
-
Apr 10th, 2006, 08:09 AM
#3
Thread Starter
Junior Member
Re: Sending a Form
how could that work if you don't have to enter a password or go through SMTP?
-
Apr 10th, 2006, 10:54 AM
#4
<?="Moderator"?>
Re: Sending a Form
PHP has build in support for sending emails thought SMTP. So you don't need to enter a password or use sockets. For more info about using the mail command check this out http://uk2.php.net/mail
-
Apr 11th, 2006, 07:58 AM
#5
Thread Starter
Junior Member
Re: Sending a Form
I'm a little new at PHP, the only complex thing I know is MySQL.
Thanks,
TheHolyMessiah
-
Apr 18th, 2006, 03:01 PM
#6
Frenzied Member
Re: Sending a Form
To email the html form use frontpage extensions. In this way, you need not write any server side code and the whole form with well formatted data will be emailed where you want.
Another way is to use server side PHP script. I have a PHP file (I downloaded it somewhere), if you post any of your form to that file, regardless of any number of fields you have, it will email you the entire data of the form. Let me know if you need it.
Thanks.
-
Apr 18th, 2006, 05:39 PM
#7
<?="Moderator"?>
Re: Sending a Form
 Originally Posted by usamaalam
To email the html form use frontpage extensions. In this way, you need not write any server side code and the whole form with well formatted data will be emailed where you want.
This is only good if you are on windows hosting, but if you want more freedom from your script you really need to write your own scripts.
-
Apr 19th, 2006, 01:15 AM
#8
Frenzied Member
Re: Sending a Form
I just implemented frontpage extensions on linux hosting.
-
Apr 19th, 2006, 01:21 AM
#9
<?="Moderator"?>
Re: Sending a Form
I stand corrected, though have had nothing but grief when trying to use Frontpage Extensions.
-
Apr 19th, 2006, 01:36 AM
#10
Frenzied Member
Re: Sending a Form
I don't know much about PHP hosting, I'm new to PHP, but I'm using 1and1 hosting on linux server and it has frontpage extensions. I implemented it yesterday and everything is working fine.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|