cfelseif not working
Hi,
Anyone have a suggestion as to why my cfelseif is not working? I am trying to check to see if a username (login) and then a team name (teamname) is present so I don't get duplicates. It checks the username (login), but forgets about the teamname.
<cfquery name="qlogin" datasource="mydb">
SELECT * FROM team WHERE login LIKE <cfqueryparam value="%#form.login#%"> OR teamname LIKE <cfqueryparam value="%#form.login#%">
</cfquery>
<cfif form.login IS #qlogin.login#>
Username already taken, please <A HREF="javascript:history.back()">go back</A> and choose another username
<cfelseif form.teamname IS #qlogin.teamname#>
Team Name already taken, please <A HREF="javascript:history.back()">go back</A> and choose another Team Name
<cfelse>
Insert this stuff into the database
</cfif>
