if #user_id# equals #user_id# ?
wouldn't that always return true?
but you could try
<cfif "#user_id#" eq #user_id#>
Sorry User_ID is taken
</cfif>
but that will always return true... there's a bunch of ways of doign this -
here's one, i'm sure there are better ways
<cfquery name = "usercheck">
select count(*) as user_id_check
from database
where '#form.userid#' eq user_id
</cfquery>
<cfif #usercheck.user_id_check# eq "0">
sorry that username is taken
</cfif>
-----Original Message-----
From: HappyToad.com [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 12, 2000 2:08 PM
To: CF-Talk
Subject: cfif help???
I am trying to set up a form that compares the form field user_id to the
database. Here is what I have written:
<cfif '#user_id#'=#user_id#>
Sorry User ID is Taken
<cfelse>
<!---Create New User--->
<cfinclude template="create_user.cfm">
</cfif>
I am getting an error saying:
Error Diagnostic Information
InsideText
Cannot convert user1 to boolean.
user1 is what was entered as user id on the form page.
Any ideas,
Rich
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.