visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
315 experts, 1193 registered users, 1659 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

Languages :: PHP :: Adding Mailing Functionality to Submit Button


By: tgbekele U.S.A.  Date: 23/05/2003 00:00:00  English  Points: 300 Status: Answered
Quality : Excellent
Wondering if anyone can help me with the following:

I am using MySQL database with PHP on an Apache web server.

I have a database created and a certain table with certain fields populated via a form on a web page.
Once the form is completed, there is a SUBMIT button at the end, which will basically INSERT the information in the table of the MySQL database. Pretty basic.

What I am trying to do is to have that same SUBMIT button, somehow send an email to me with certain fields from the table in the body of the email.
Something like ...

-------------------------------------------
You have new data updated to your database.
Information entered by <NAME FROM ENTERED FIELD>
Request is <DESCRIPTION FROM ENTERED FIELD>

------------------------------

Is it possible to do this with that one SUBMIT button?
If so, any suggestions how?

Would appreciate any ideas.
Thank you.

tgb
By: VGR Date: 23/05/2003 17:38:00 English  Type : Answer
yes, of course.

I do this all the time 8-)

show me your script for the treatment of the SUBMIT-ted data and the DB insert
By: tgbekele Date: 23/05/2003 17:57:00 English  Type : Comment
Used mail function ....

mail($to,$subject, $message, "FROM: <email address>\r\n"."X-Mailer:PHP/" .phpversion());

Thank you for responding so quickly though ...

tgb
By: tgbekele Date: 23/05/2003 17:58:00 English  Type : Comment
Included values from the database inside the $message body ... made sure all the variables and mail function are run inside the PHP tag.
By: VGR Date: 23/05/2003 18:25:00 English  Type : Comment
I was about to tell you this, after having seen the existing code 8-(


Do register to be able to answer

EContact
browser fav
page generated in 336.086990 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page