Results 1 to 2 of 2

Checking for new username in ColdFusion?

This is a discussion on Checking for new username in ColdFusion? within the Programming forums, part of the Web Designing & Development category; Ok so i know how to use this feature except for one thing, When a user inputs a username already ...

  1. #1
    Junior Member Array
    Join Date
    Feb 2008
    Posts
    2

    Default Checking for new username in ColdFusion?

    Ok so i know how to use this feature except for one thing, When a user inputs a username already taken, I get to direct them anywhere, How do I direct back to the form with all their info still filled in...?

  2. #2
    Senior Member Array akash's Avatar
    Join Date
    Oct 2008
    Location
    Heaven (Earth)
    Posts
    500

    Default Re: Checking for new username in ColdFusion?

    Hope that is you searching......
    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 (
    [COLOR=green]  <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>[/COLOR]
      ,
      <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>



Similar Threads

  1. Checking Backlinks For A Domain
    By SticKer in forum Tools & Products
    Replies: 13
    Last Post: 01-24-2012, 06:46 AM
  2. SQL Query in coldfusion?
    By sparky77275 in forum Programming
    Replies: 4
    Last Post: 04-26-2011, 11:48 AM
  3. Replies: 0
    Last Post: 02-07-2008, 06:46 PM
  4. HTML Username / Password Field Help?
    By bz8420 in forum Web Design
    Replies: 0
    Last Post: 02-07-2008, 12:39 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO Forum | Web Hosting Forum | Websites For Sale |