Hey all,
I’ve created a register form that includes some Dreamweaver generated code and code of my own. What I did was within the main query that handles the insert of the userID I added another query within the <cfif> to see if the userID already exists. The problem is that when I test the form it goes no where, just keeps thinking.
The dark orange is where i believe I have the problem.
Here is the my query code;
<cfset CurrentPage=GetFileFromPath(GetTemplatePath())>
<cfparam name="FORM.UserID" default="1">
<cfif IsDefined("FORM.MM_InsertRecord") AND FORM.MM_InsertRecord EQ "register">
<cfquery datasource="walyerMembers">
INSERT INTO tblWalyerMembers (UserID, Password, Date, Email)
VALUES (
<cfif IsDefined("FORM.userid") AND #FORM.userid# NEQ "">
<cfquery name="Recordset1" datasource="walyerMembers">
SELECT UserID
FROM tblWalyerMembers
WHERE UserID = '#FORM.UserID#'
<cfoutput>
<cfinclude template="register.cfm" />
<div align="center" class="style3">*Your User Name is already taken by another User.*</div>
</cfoutput>
</cfquery>
<cfelse>
'#FORM.userid#'
</cfif>
,
<cfif IsDefined("FORM.password") AND #FORM.password# NEQ "">
'#FORM.password#'
<cfelse>
NULL
</cfif>
,
<cfif IsDefined("FORM.email") AND #FORM.email# NEQ "">
'#FORM.email#'
<cfelse>
NULL
</cfif>
)</cfquery>
<cflocation url="registerComplete.cfm">
</cfif>
Any ideas will be great.
Take care,
Walyer