variables.error = arrayNew(1);
if (isdefined("form.title")) {
function IsEmail(str) {
if (REFindNoCase("^['_a-z0-9-]+(\.['_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.(([a-z]{2,3})|(aero|coop|info|museum|name))$",str)) return TRUE;
else return FALSE;
}
if (not len(form.title)) foo = arrayAppend(variables.error, "Please select your title");
if (not len(form.firstname)) foo = arrayAppend(variables.error, "Please enter your first name");
if (not len(form.lastname)) foo = arrayAppend(variables.error, "Please enter your last name");
if (not len(form.company)) foo = arrayAppend(variables.error, "Please enter your company name");
if (not len(form.jobTitle)) foo = arrayAppend(variables.error, "Please enter your job title");
if (form.emailPref EQ 'homeemail') {
if (not len(form.homeemail)) {
foo = arrayAppend(variables.error, "Please enter your home email address");
} else if ( not IsEmail(form.homeemail) ) {
foo = arrayAppend(variables.error, "Your home email address does not appear to be formatted correctly.");
}
}
if (not len(form.workemail)) {
foo = arrayAppend(variables.error, "Please enter your work email address");
} else if ( not IsEmail(form.workemail) ) {
foo = arrayAppend(variables.error, "Your work email address does not appear to be formatted correctly.");
}
if (not len(form.address)) foo = arrayAppend(variables.error, "Please enter your address");
if (not len(form.towncity)) foo = arrayAppend(variables.error, "Please enter your town/city");
if (not len(form.postcode)) foo = arrayAppend(variables.error, "Please enter your postcode");
if (len(form.username) LT 5) foo = arrayAppend(variables.error, "Please enter a username at least 5 characters long. This username can be used to anonymously identify you in the forums");
if (len(form.password) LT 5) foo = arrayAppend(variables.error, "Please enter a password at least 5 characters long"); else if (form.password NEQ form.password2) foo = arrayAppend(variables.error, "Your password and password confirmation do not match. Please check and try again.");
if (not isdefined("form.areaIDs")) foo = arrayAppend(variables.error, "Please select at least 1 area of interest");
}
SELECT userID
FROM tblUsers
WHERE username =
SELECT userID
FROM tblUsers
WHERE homeemail =
OR workemail = login here and use the password reminder service if necessary.")>
SET NOCOUNT ON
INSERT INTO tblUsers (title, firstname, lastname, company, jobTitle, telephone, fax, homeemail, workemail, address, towncity, countyID, countryID, postcode, username, password, isConsumer, sectorID, newsLetter, emailPref, lastLogin, freeTrial, securityLevel)
VALUES (
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
)
SELECT @@IDENTITY AS userID
SET NOCOUNT OFF
INSERT INTO tblUsersToInterestAreas (userID, areaID)
VALUES (
,
)
Thank you for registering with Credit Today Online. You have also subscribed to a 3 month free trial of CreditToday magazine.
Your log details are confirmed below:
Username: #form.username#
Password: #form.password#
You can update your details and preferences here:
#Application.vRoot#account/preferences.cfm
Credit Today Online
#Application.vRoot#
Title: #form.title#
First name: #form.firstname#
Last name: #form.lastname#
Job Title : #form.jobTitle#
Company name: #form.company#
Address: #form.address#
Town/City: #form.towncity#
Postcode: #form.postcode#
Telephone: #form.telephone#Magazine subscription: 3 month free trial
Thank you.
SELECT countyID, countyName
FROM tblCounties
ORDER BY countyName
SELECT countryID, countryName
FROM tblCountries
SELECT areaID, areaName
FROM tblInterestAreas
ORDER BY areaName
SELECT sectorID, sectorName
FROM tblIndustrySectors
ORDER BY sectorName