|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
contact form
how would I go about creating some sort of contact page on my website instead of having people using my email address directly?
|
|
#2
|
|||
|
|||
|
And why is this post on Business section? Anyway - creating some sort of contact page - that is very vague. What are you using, plain HTML on unix server? .NET on IIS? Coldfusion? J2EE? What exactly are you using?
|
|
#3
|
||||
|
||||
|
I don't know how you would go about it. I'd write a Perl script, it would take about five minutes, and I'd be done with it.
You can Google for Perl you can Google for PHP but either way there's probably only a few million examples to be found. |
|
#4
|
|||
|
|||
|
If you have asp and Cdonts support, you can just use the script below. Copy and paste and change the email to your own and change the redirect URL. I'm assuming that you can create your html form with the method = post and action = to the script file name (mines is send_email.asp). If you have any problems with it, let me know.
send_email.asp file starts here ---------------------------------------------------- <% Option Explicit Dim objNewMail, userName, userEmail, userComment userName = Request.Form("userName") userEmail = Request.Form("userEmail") userComment = Request.Form("userComment") ' First create an instance of NewMail Object Set objNewMail = Server.CreateObject("CDONTS.NewMail") ' For objNewMail.From, you can use the one received from ' the form, userEmail, but if the user types in an invalid email ' you will not receive the email. ' So I just placed the user email in the subject of ' the email. Of course you could do a ' validation check but this is the simple way objNewMail.From = "your_userid@your_domain.com" objNewMail.To = "your_userid@your_domain.com" objNewMail.Subject = "Any subject title you want" objNewMail.Body = "Name: " & userName & " *** Email: " & userEmail & " *** Comments: " & userComment objNewMail.Send ' After the Send method, the NewMail Object become Invalid ' You should set it to nothing to relase the memory Set objNewMail = Nothing ' If you want to send another mail ' you have to create a new instance of NewMail Object again. Response.Redirect "http://www.some-confirmation-page-or-any-other-page.html" %> --- end of script |
|
#5
|
|||
|
|||
|
ASP and CDonts are much simpler than Perl and CGI.
|
|
#6
|
|||
|
|||
|
if your server doesnt accept asp then id try hotscripts.com they will have a ready made script where you just have to make 1 or 2 changes, or if you send me a PM ill send you the files needed to create 1 like on my site
__________________
Free Forum hosting for clans |
![]() |
| Viewing: Dev Shed Forums > Web Site Management > Business Help > contact form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|