Two Actions With One Submit
I have a form which people use to place orders on my website. At the moment when they submit it sends the info to my email address is the usual way.
I now have a php file that submits the info to a MySQL database.
What I would like to do is when the user clicks submit, it sends the info to my email address AND runs the php that updates my database.
I can only make the submit button do one or the other.
Thank you in advance for any and all help.
Just adding a mail function to the PHP file would do the trick.
The data should already be processed in preparation to be inserted into the database.
Thank you for your swift response.
I made a mistake in my post. I currently use an autoresponse php which sends me the form data and send sthe user an auto reply.
Is there a way of joining the autoresponse php with the MySQL php?
I have tried just adding it to the bottom of the autoresponse php file, but it adds a blank record to my database everytime the page loads!
Thanks again, any help much appriciated!
I would probably insert the data into the database at the start of the autoresponse script, and after inserting into the database don't end the script or redirect just let it continue to process the send mail..
How about posting to a third script which includes one and two?
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread