Darren,

  It looks like you are trying to access a property on a FORM variable that 
doesn't exists. FORM.register_button is a valid FORM variable but you've added 
".y" to the end of it. There will never be a property defined using 
"FORM.register_button.y" so all your database-related logic gets skipped. 
Remove ".y" and give it another try.

Best,
Todd Cullen
Senior Developer
Pier Interactive
email: [EMAIL PROTECTED]

> Can anyone please tell me where i am going wrong? i have built a form 
> for registering users but i want a message to appear in the header to 
> say if someone has already logged in with that email address if they 
> input it into the email field. can any1 see if there is any flaws in 
> the code below? i cant see anything myself? its baffled me
-------------> 
---------------------------------------------------------------------
> <cfset bRegistrationSuccess = false /> 
 
> 
 
> <cfif isDefined ('FORM.register_button.y')>
 
> <cfquery datasource="stardust" name="qUserCheck">
 
> SELECT *
 
> FROM lcf_user
 
> WHERE email = '#FORM.email#'
 
> </cfquery>
 
> 
 
> <cfif qUserCheck.RecordCount NEQ 0>
 
> <cfset sHeaderMessage = "Someone has already Registered with that 
> email " />
 
> <cfelse>
    
> <cfquery datasource="stardust" name="qUserType">
    
> SELECT user_type_id
    
> FROM lcf_user_type
    
> WHERE type = 'basic'
    
> </cfquery>
 
> 
    
> <cfquery datasource="stardust">
    
> INSERT INTO lcf_user (user_id, name_first, name_last, email, password, 
> sign_up_date, user_type_id)
    
> VALUES ('#CreateUUID()#', '#FORM.name_first#', '#FORM.name_last#', 
> '#email#', '#FORM.password#', #CreateODBCDateTime(Now())#, 
    
> '#qUserType.user_type_id#')
    
> </cfquery>
>       
>       <cfset bRegistrationSuccess = true />
>       
   
> </cfif>
 
> </cfif><title>User Registration</title>
 
> 
 
> <cfif NOT bRegistrationSuccess>
  
> <cfinclude template="../../header.cfm" />
    
> <form action="<cfoutput>#CGI.SCRIPT_NAME#</cfoutput>" method="post">  
    
> <table>
      
> <tr>
        
> <td colspan="2">
>             <img src="/images/spacer.gif" height="10" />
>           </td>
>         </tr>
>         <tr>
>           <td colspan="2" class="ltturq">First Name:</td>
>         </tr>
>         <tr>
>           <td colspan="2" class="turqblue">
>                 <input type="text" name="name_first" class="field" />
>               </td>
>         </tr>
      
> <tr>
        
> <td colspan="2">
>             <img src="/images/spacer.gif" height="10" />
>           </td>
      
> </tr>
>         <tr>
>           <td colspan="2" class="ltturq">Last Name:</td>
>         </tr>
>         <tr>
>           <td colspan="2" class="turqblue">
>                 <input type="text" name="name_last" class="field" />
>               </td>
>         </tr>
      
> <tr>
        
> <td colspan="2">
>             <img src="/images/spacer.gif" height="10" />
>           </td>
      
> </tr>
      
> <tr>
>           <td colspan="2" class="ltturq">Email:</td>
>         </tr>
>         <tr>
>           <td colspan="2" class="turqblue">
>                 <input type="text" name="email" class="field" />
>               </td>
>         </tr>
>         <tr>
        
> <td colspan="2">
>             <img src="/images/spacer.gif" height="10" />
>           </td>
      
> </tr>
>         <tr>
>           <td colspan="2" class="ltturq">Password:</td>
>         </tr>
>         <tr>
>           <td colspan="2" class="turqblue">
>                 <input type="password" name="password" class="field" />
>               </td>
>         </tr>
      
> <tr>
        
> <td colspan="2">
>             <img src="/images/spacer.gif" height="10" />
>           </td>
      
> </tr>
>         <tr>
>           <td colspan="2" class="ltturq">Confirm Password:</td>
>         </tr>
>         <tr>
>           <td class="turqblue">
>                 <input type="password" name="password_confirm" class="field" 
> />
>               </td>
>               <td>
>             <input type="image" name="register_button" src="..
> /images/register.gif"  />
  
> </td>
>         </tr>
>         
      
> <tr>
        
> <td colspan="2">
>             <img src="/learningcoldfusion/images/spacer.gif" height="10" 
> />
>           </td>
      
> </tr>
>         </tr>
      
> <tr>
>        
        
> <td colspan="2">
>             <img src="/images/spacer.gif" height="10" />
>           </td>
      
> </tr>
    
> </table>
  
> </form>
  
> <cfinclude template="../../footer.cfm" />
> </cfif> 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade to ColdFusion 8 and integrate with Adobe Flex
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3146
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to