Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Post to Email and Database
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Post to Email and Database

 Post Reply Post Reply Page  12>
Author
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Topic: Post to Email and Database
    Posted: 14 May 2003 at 6:30pm
Hello,

Can anyone tell me how to post form results to both an email and to a database via using one submit button?

Thanks in advance for the advice.

I also posted this message in the Database section, wasn't sure where is should go.
Back to Top
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2003 at 11:44am
No one seems to be replying, does this mean that it cannot be done?
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2003 at 11:57am
It can be done just put your email script and your database script on the same page that your form is posting or getting to pretty simple really...
Back to Top
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2003 at 12:24pm
Okay, so I figured out that my question is relating to html and not asp (I think).
But my questions still stands:
How do I incorperate the following onto one page?
<FORM METHOD="POST" ACTION="mailto:your email address">
<FORM METHOD="POST" ACTION="http://www.************/postnew.asp">

I two actions that I want to accomplish. You tell me to put my email script on the same page as my posting form, well I don't have an email script as you can see above, I am using the mailto: command.

If everyone isn't sure as to what it is that I need to do can someone point me to a link that might have the info. I have been searching google far and wide.

Thanks.
Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2003 at 1:06pm

you don't need to incorporate those, you just send the form to postnew.asp like:

<form method="post" action="postnew.asp">

then on postnew.asp you can have a script that emails the form to you, there's some tutorial on how to send emails from and asp script on this site, you might want to read them....

<edit> Another trick if you don't have an email component or want to use the mailto: command for some reason try including this javascript on your postnew.asp:

<script>
function submitform() {
    document.myform.submit();       
}

</script>

<body onLoad="submitform()">

<form name="myform" action="mailto: youremail">
..
.. All your hidden vars
..
</form>

<!-- your page html here -->

</body>

right after your asp code, that will autosubmit a hidden form to your email from the postnew.asp



Edited by fernan82
FeRnAN
Back to Top
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2003 at 1:25pm

Thanks for help and pointing me in the right direction.  I think what it is that I am looking for was like you said on this site.

 ASP Web Based Email Using Microsoft's CDONTS

I am going to try it out, wish me luck and thanks for the script.

Back to Top
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2003 at 11:57pm
Okay, CDONTS is working very well. I was able to use a form field for the objNewMail.To, which is very nice. My question is how do I mix and match text with form results in the body and subject?
I tried the following and it didn't work:
objNewMail.Subject = "Thank you" nbsp;request.form("field1")nbsp;request.form("field2"

Anyone ideas?
Back to Top
288enzo View Drop Down
Groupie
Groupie
Avatar

Joined: 28 April 2003
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote 288enzo Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2003 at 11:58pm
objNewMail.Subject = "Thank you" nbsp;request.form("field1")nbsp;request.form("field2")

forgot the last )

Question still stands.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.