Jump to content


Photo

Multiple actions on submit?


  • Please log in to reply
2 replies to this topic

#1 network23

network23
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 24 November 2003 - 10:34 PM

What\'s the best way to do this? I want to do more than one thing when the user submits a form. I want their data input into the database and I also want a response email mailed to them using a mailform script.

Now, I could have the first Submit enter the code and have the user hit ANOTHER button to send the email, but that seems very user-hostile.

Is there another way to do something like this?

#2 SubXO

SubXO
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 25 November 2003 - 07:32 AM

the way I would do it is I would make 2 functions and call them once the user submits a form

button ==> submit ==> result.php*

*containing 2 functions:
1 - data input
2 - response email

note: I\'ve had to open connect to mysql once for each action

anyone got any other solultions? :)

#3 Hokus

Hokus
  • Members
  • PipPip
  • Member
  • 23 posts
  • LocationAlameda, CA, USA

Posted 26 November 2003 - 02:55 AM

Just make one script which performs both.
[!--sizeo:2--][span style="font-size:10pt;line-height:100%"][!--/sizeo--][!--fonto:Arial--][span style="font-family:Arial"][!--/fonto--][!--coloro:blue--][span style="color:blue"][!--/coloro--]"Experience is a wonderful thing. It enables you to recognize a mistake when you make it again".
[!--sizec--][/span][!--/sizec--][!--colorc--][/span][!--/colorc--][!--fontc--][/span][!--/fontc--]




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users