Discussion Locked

Web Page Forms (HTML?)

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I just recently put up my own site on the net. Currently I'm using WWWToolz http://wwwtoolz.com/home/ to add a form for users to join a mailing list or ask a question on my site. I want to code my own form since WWWToolz sends the user an email with their email address rather than my own. How can I code a form & have it sent through my site somehow myself? Thanks!

7 replies

by r. a. caluste

html forms are easy to code. using a tool similar to frontpage, you can add forms to it. the main problem here is where to send your page after the submit button has been clicked (the action). you have to indicate your platform (is it unix or iis?).if in unix (say apache server), you use cgi, perl or php. if iis, you use asp.

kindly provide more info.

Allan

by techwine

I am running Windows based platform Allen. I'm so confused about how to do this. I'm familar with HTML but not PHP or ASP yet. Thanks for your fast reply!

by todd parker

Using a Windows Based Web Server means you are probably using IIS as your web platform. That being the case, it would best to write your email application in ASP scripting (VB) behind your web pages, and use the CDONT's object to send through SMTP. Yes - this is the more complicated method if you are new to ASP.

IF you're looking for a quick fix, and don't want to learn anything - Try installing Front Page Server extensions on your site, and then build your form using Front Page. It has built in features that allow you to specify where mail should be sent after the submittal of a form. I do not recommend this approach, as adding FP server extensions is taboo to advanced developers. However, it's quick and extremely dirty, but gets the job done.

If you're going to write ASP (Server Side VB Scipting) (MY RECOMMENDATION), then you can use the following CDONT's code to send the mail:

1.) Make a form that has a method of POST and an action of 'receivingpagename.asp'
2.) Create the receivingpagename.asp page and insert the following code. (Modify to your needs):
<%
BodyTxt = Request.Form("EmailBodyTextFld")
Set objMail = Server.CreateObject("CDONTS.NewMail")
objmail.From = "YourEmail@address.com"
objMail.Subject = Request.Form("SubjectFld")
objMail.To = Request.Form("SendToEmail@Address.com")
objMail.Body = BodyTxt
objMail.Importance = 1
objMail.send
set objmail = nothing
%>
Then of course you might want to stick some HTML in there, something like:

Thanks for sending the email

Questions? email parkerto@saic.com

This discussion is closed to new replies.