Coyotes Mud Buddies
Come jump in the Mud
<% '''If the form has not been filled in then display this code If Request.Form("Submit")<>"Submit" Then %>

<%= sSitename %> Membership Signup Form - All fields are mandatory.
You will be sent a password once your membership has been approved.
First name
Surname
Address
City
State / County
Country
Zip or Postcode
Email Address
Where did you hear about website?
Please select a Username
 
 

Membership is $30.00 for 6 months, $50.00 for 1 year.

<% 'if the form has been submitted correctly then execute this code Else 'Declare variables Dim oConnection, oRecordset, sSQL Dim sFirstname, sSurname, sAddress, sCity, sStateCounty, sCountry Dim sZipPostCode, sEmail, sHear_about_website, sUsername Dim sSubject, sEmail_body, sRandomPassword 'Receive variables sFirstname=Fixquotes(Request.Form("txtFirstname")) sSurname=Fixquotes(Request.Form("txtSurname")) sAddress=Fixquotes(Request.Form("txtAddress")) sCity=Fixquotes(Request.Form("txtCity")) sStateCounty=Fixquotes(Request.Form("txtStateCounty")) sCountry=Fixquotes(Request.Form("txtCountry")) sZipPostCode=Fixquotes(Request.Form("txtZipPostCode")) sEmail=Fixquotes(Request.Form("txtEmail")) sHear_about_website=Fixquotes(Request.Form("txtHear_About_Website")) sUsername=Fixquotes(Request.Form("txtUsername")) 'call the function and return a password of 5 characters sRandompassword=makePassword(5) 'Server side Validation and Email Function to check valid email If sFirstName="" OR sSurName="" OR sAddress="" OR sCity="" OR sStateCounty="" OR sCountry="" OR _ sZipPostcode="" OR sEmail="" OR sHear_about_website="" OR sUserName="" OR IsValidEmail(sEmail)=False Then Response.write "
Please click on the browser back button and make sure that you " & _ " have provided a valid email and filled in all fields.
" Else 'Insert values into the database sSQL="INSERT INTO tblMembers(FirstName, SurName, Address, City, StateCounty, Country, ZipPostcode," & _ "Email, hear_about_website , UserName, MembersPassword, Active, DateAdded) VALUES ('" & sFirstname & "'," & _ "'" & sSurname & "', '" & sAddress & "', '" & sCity & "', '" & sStateCounty & "', '" & sCountry & "'," & _ "'" & sZipPostCode & "', '" & sEmail & "','" & sHear_about_website & "', '" & sUserName & "'," & _ "'" & sRandompassword & "','N', '" & Now() & "')" Set oConnection=Server.CreateObject("ADODB.connection") oConnection.Open(sConnString) oConnection.execute(sSQL) Response.write "
You will be notified by email once your membership has been approved and your payment processed. Payment processing is not automated. It may take me up to 2 days to process the payment. Please select either a 6 month membership for $30.00 or a 1 year subscription for $50.00
Click here to pay.
" 'Send out an email notifying admin of a new member needing approval sSubject=sSitename & " Membership" sEmail_body="A new member needs approval.
ADMIN" Call SendEmail(sAdminEmail, sSubject, sEmail_body, sAdminEmail, "HTML") 'Close the connection and free up resources oConnection.Close Set oConnection=nothing End If End If %>