I am trying to find out how to post a form (from user input) to our MYSQL databast and in the same action, send an email notification that someone has posted data to the data base. I am new to PHP so I am not sure how to do this. Any ideas?
Thanks for your help!
tbergquist@okwu.edu
Post to Databast and Send mail in one action
Moderator: General Moderators
-
tbergquist
- Forum Newbie
- Posts: 2
- Joined: Fri Nov 15, 2002 9:45 am
- Location: Oklahoma
-
tbergquist
- Forum Newbie
- Posts: 2
- Joined: Fri Nov 15, 2002 9:45 am
- Location: Oklahoma
Re. post to database and send mail
Well, I guess I am not sure. I have been using Adobe GoLive to create our pages. I am sure you might think i am retarded or somthing...
My best educated guess would be in one script.
Thanks for your help
My best educated guess would be in one script.
Thanks for your help
Well, you can do it in one script. That's really no problem. You just need the mail() function and whatever process you choose to dump the data into a database. There are a number of good tutorials on dealing with the above issues.
Ultimately, nothing is better than learning how. Whatever this GoLive is, it's not as good as you are if you learn how to program.
Do a search on google for tutorails. PHPBuilder has a good share of tut's as well. The manual (at php.net) is a winner too. Stick around here too. Nobody will write a script for you (unless you pay them) but we will try to help.
Cheers,
BDKR
Ultimately, nothing is better than learning how. Whatever this GoLive is, it's not as good as you are if you learn how to program.
Do a search on google for tutorails. PHPBuilder has a good share of tut's as well. The manual (at php.net) is a winner too. Stick around here too. Nobody will write a script for you (unless you pay them) but we will try to help.
Cheers,
BDKR
AFter your page inputs to the database you can do the following.
$recipient = recips_email;
$subject = "Your subject";
$message = "Hello $user. Glad you registered with us.";
$extra = "From: me@me.com";
mail ($recipient,$subject,$message,$extra);
$recipient = recips_email;
$subject = "Your subject";
$message = "Hello $user. Glad you registered with us.";
$extra = "From: me@me.com";
mail ($recipient,$subject,$message,$extra);