•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 426,414 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,341 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser: Programming Forums
Views: 790 | Replies: 0
•
•
Join Date: Jan 2008
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hi, My name is Josh and as my username implies I am a Coldfusion Intern. I have learned everything about coldfusion from volumes 1 and 2. I have a question about cfset. I am making a error list using if statements like so:
now in order for the user to get their data inserted in to my db the form has to pass this
is there a way to set this statement to a variable scope so all i have to do is <cfif var."name" eq 0>? thanks for the help.
<cfswitch expression="#form.a#">
<cfcase value="submit">
<cfif len(trim(FORM.username)) eq 0>
<cfset VAR.signuperror1 = "Please fill in valid email address">
<cfelseif FORM.username does not contain "@">
<cfset VAR.signuperror1 ="Required email is invalid">
<cfelseif FORM.username does not contain ".com">
<cfset VAR.signuperror1 ="Required email is invalid example 'johndoe@hotmail.com'">
</cfif>
<cfif len(trim(FORM.fname)) eq 0>
<cfset VAR.signuperror2 = "Please fill in full name">
</cfif>
<cfif len(trim(FORM.password)) eq 0>
<cfset VAR.signuperror3 = "Please enter Password">
<cfelseif isnumeric(FORM.password) eq 0>
<cfset VAR.signuperror3 = "Password has to be Numeric">
</cfif><cfif len(trim(var.signuperror1)) eq 0 and len(trim(var.signuperror2)) eq 0 and ......>
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Other Threads in the ColdFusion Forum
- Previous Thread: Why Do Designers BS
- Next Thread: How to highlight duplicate values



Threaded Mode