southafricadude Posted October 17, 2012 Share Posted October 17, 2012 Hi there, I am not a proper coder, and am using the built in Dreamweaver options to display some tables and do some updates to tables. I have a form on a php page to update a record, which works fine, but I would like the page to send a php email of the contents of the form either before or after it updates the database. How can I do this? I think the code that Dreamweaver uses to update the table and redirect is this: $updateGoTo = "thank-you.php"; if (isset($_SERVER['QUERY_STRING'])) { $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?"; $updateGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $updateGoTo)); } What I would like to do is insert a script there somewhere, that will send an html email to a recipient with the information contained in the form, so that they are notified of the update, and what the contents of the update are. Is there someone on this site who could explain to me where to insert the code for the php email, or explain a better way to do it? Thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/269584-dreamweaver-update-db-script-help/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.