Languages :: PHP :: Adding Mailing Functionality to Submit Button |
|||
| By: tgbekele |
Date: 23/05/2003 00:00:00 |
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 | 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 | 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 | 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 | Type : Comment |
|
| I was about to tell you this, after having seen the existing code 8-( |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








