Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One Button, Multiple Actions

Status
Not open for further replies.

dennco4

MIS
Feb 13, 2002
61
US
Is there a way to create a form that when a user hits the submit buton it will update a mysql database and e-mail the information? I have the form updating just fine, but I need it to e-mail the updated information out as well. I was wondering if someone knew how to do this. I have Dreamweaver MX. Any ideas?
Thanks for all the help.
Dennco4
 
This faq770-3089 shows you how to create a session of the newly entered record, which in turn you can use to create an email page.

Hope it helps...



Delete * from brain Where MaxLevel = "Full" and reaction = "Slow" order by StartOver
 
General idea.
Form submits its fields to the page specified in action attr. (<FORM... ... action='page.asp'>)

in this page.asp you should have a procedures for:
updating your records &
sending an email

You can type both procedures by yourself or let DWMX generate the code.
I'd enclose email sending code into a separate sub -
SUB Send_email()
............
code is here
.........
END SUB

and put:

Call Send_email

after your updating/inserting code

Be aware - DWMX may create pretty obscure code and submit page onto itself.
Sometimes it's worth doing some things by hand.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top