What error messages are you seeing?

Duane

-----Original Message-----
From: Brian Ingram [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 11, 2000 8:29 PM
To: [EMAIL PROTECTED]
Subject: Newbie, needs Help with Login


Hi all,

I'm new at CF and i'm having a few problems with a user login menu.

Specifically;
1) If the user just "clicks" submit, without entering any data, I get an
ERROR message.
2) If the user enters a login name that's already taken, I get an ERROR
message.

Does anyone know how to fix these problems?  Here is the code i'm using
below.  (I apologize for the length of the message)



==================snippet of checklogin.cfm================
===========================================================
Hi,<H2>Please enter your username and password below</H2>
<cfoutput>
<cfFORM ACTION="checklogin.cfm" METHOD="POST">

UserName: <cfINPUT TYPE="text" NAME="username1"><BR>

Password: <cfINPUT TYPE="password" NAME="password1"><BR>

<P>
<INPUT TYPE="submit" VALUE="Submit">
<INPUT TYPE="reset" VALUE="Clear">

</cfFORM>
</cfoutput>
===========================================================

This goes to checklogin.cfm.  Here i query the database to see
if the Username (already in the DB) matches the (username1) entered by the
user.
Then i try to route the user to the appropriate page. ----->

====================checklogin.cfm code ====================
===========================================================
<cfquery name="check" datasource="store">
SELECT Username, Password
FROM User
WHERE Username='#username1#'
</cfquery>


<html>
<head><title> Check Login Information </title></head>
<body>

<cfoutput query="check">
<cfif (Len(Trim("#username1#") IS NOT 0) AND Username IS #username1# AND
Password IS #password1#>

<cfcookie name="name" value="#username1#">
<cfcookie name="pass" value="#password1#">
<br>
<br>
<center><h2>
Thanks for logging in to the bookstore.  </h2>
<br>
<br>
<br>Please, click here to go to the main menu.
Click ---> <a href="usermenu.cfm"> Main Menu</a>
</center>
<cfelse>
<center>
<h2>
Were Sorry, your login is taken.</h2>
<br>
<br>
Please go to the new user section and get a login and password!<br>
Click-----> <a href="newuser.cfm">New User</a>
</center>
</cfif>

</cfoutput>
=====================================================

Thanks in advance for your help.

Brian
-----------------------------------------------
FREE! The World's Best Email Address @email.com
Reserve your name now at http://www.email.com


----------------------------------------------------------------------------
--
Archives: http://www.eGroups.com/list/cf-talk
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.eGroups.com/list/cf-talk
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.

Reply via email to