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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send Mail based on Form Value - Only Once!

Status
Not open for further replies.

cyberbob2

Programmer
Nov 13, 2003
32
US
Hello,
I've been racking my brains over this one. I have a Classic ASP edit form with many fields, one of them a Status drop-down. If the Status (option value) has been changed to "Pending" for instance, I do a objMail.send, otherwise it doesn't send. No problem, but how can I prevent the mail from sending AGAIN if a user goes back to the page and updates another field, or even just refreshes the page? If it helps, I am updating a SQL Server database. Any help sure would be appreciated.
Thanks in advance, KP
 
You could use a session variable or, since you are already updating a database you could check a field value and make the "send or don't send" decision based on the value.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top