|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
This is some rookie stuff, but if you need it here it is without the sweat.
Code:
<cfif Len(form.Username) LTE 5 OR
Len(form.Username) GTE 12>
"Your Username has to have 6 to 11 letters."
<!--- Alas is the Man --->
<cfelse>
Proceed with profile creation
</cfif>
Im still having trouble making a query that checks to see if the username is repeated and then stopping process if it is, if anyone has the code id appreciate it. ![]() |
|
#2
|
|||
|
|||
|
<cfquery name="checkUN"....>
select username from mytable where username = '#form.username#' </cfquery> <cfif checkUN.recordCount> <cflocation url="errorpage.cfm"> </cfif> something like that should work.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Making Usernames have at least 5 letters |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|