PHP.TheDemoSite.co.uk

 
asp code examples with database connectivity

ASP.TheDemoSite.co.uk

  Just examples of ASP code, linking to your Microsoft Access database and JavaScript.
|1. Home |2. The Database |3. Add a User |4. Login |5. Get your db online|

asp code examples with database connectivity

FREE download-these asp demo-pages FREE Download
complete login
example

Size: 54 Kbytes
Example of a
ASP email contact form
using active server pages:
ASP-Contact-Us
free asp-contact-us FREE Download the complete
ASP-Contact-Us

mail form

Size: 3 Kbytes
ASP-Contact-Us

This page has the example code to produce an ASP email contact form using active server page and a simple HTML form, download the free zip here

HTML form

Copy HTML below and save as:
contactus.html

 

ASP process file

Copy ASP below and save as:
contactusprocess.asp

<%
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Freeware from Seiretto.com
' available at http://asp.thedemosite.co.uk
'
' DON'T forget to change the mail_to email address below!!!
'    and thats all you need to change.
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Dim error
error = 0
For Each f In Request.Form
If Request.Form(f) = "" Then
error = 1
End If
Next
If error=1 Then
response.redirect "error.html"
Else
Dim f, emsg, mail_to, r, o, c, other
mail_to = "you@your--domain.com"
fline = "_______________________________________________________________________"& vbNewLine
hline = vbNewLine & "_____________________________________"& vbNewLine
emsg = ""

For Each f In Request.Form
If mid(f,1,1)<>"S" = True Then 'do not save if input name starts with S
emsg = emsg & f & " = " & Trim(Request.Form(f)) & hline
End If
Next

Set objNewMail = Server.CreateObject("CDONTS.NewMail")
    objNewMail.From = Request("Email Address")
    objNewMail.Subject = "Message from contact page (version: 1.0)"
    objNewMail.To = mail_to
    objNewMail.Body = emsg & fline
    objNewMail.Send
    Set objNewMail = Nothing

response.redirect "thankyou.html"
End if
%>
 

HTML error page

Copy HTML below and save as:
error.html

 

HTML thanks page

Copy HTML below and save as:
thankyou.html

Create the files above and upload to your own server.

Further details or download the free zip here

UK Windows Hosting
Get your database online with a dependable host
www.Seiretto.com

Windows Managed Dedicated Servers
No hassle managed dedicated servers
No bandwidth limits
www.S4Servers.com



















ASP.TheDemoSite.co.uk is a Microsoft Access database and FREE ASP code example site.
The database and ASP scripts are all hosted on Seiretto Website hosting   Copyright © Contact us.