how to save data in database and sent email
Hi friends I have in my website a contact form and I want to add to the user in an email and data saved in my database how to do please and thanks in advance
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Gokhul VarmanPosted Aug 13, 2017, 9:42 AM
Manikandan MurugesanPosted Aug 12, 2017, 11:05 PM
To send email, you can use the basic mail() php function.
First, define the headers:
Finally, you specify the recipient:
Wrap it up to mail function like that:
And you are done with the mail!
More about mail function you can find here.
As for updating the mysql, you can do this:
First make sure how you are going to identify the table. This can be done for example by the row id:
Then run the query:
Hope this was what you were looking for...
ma oumlPosted Aug 12, 2017, 11:30 AM
Kumar RavishankarPosted Aug 12, 2017, 11:24 AM