Hello masters,
I'm new to Cold Fusion and have been doing my homework. Here's the scenario
and it's very simple. A password and an id is being entered via the form.
That info is being compared against a database with two columns one column
called ID the other PASSWORD. I only have one record in that database with
an id and a password. I want to check the form data against the database
data and if they are the say they are and if they are not say they are not.
SIMPLE! Well, not for me! Sad but true.
I have one cfm page that contains a form like so:
<html>
<head><title>entrance</title></head>
<body>
<form action="hobnobber.cfm" method="post">
enter in your id:<input type="text" name="id1"><br>
enter in your password:<input type="text" name="password1"><br>
<input type="submit">
</form>
</body>
</html>
Here's hobnobber.cfm:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>TEST COLD FUSION</title></head>
<body bgcolor="Olive">
<cfquery name="blahblahblah1" datasource="blahblahblah2" dbtype="ODBC">
SELECT ID,PASSWORD
FROM Table2
</cfquery>
<cfoutput>
<cfif (#id1# is #ID#) AND (#password1# is #PASSWORD#)>
your id and password are correct
<CFELSE>
your id and password are not correct
</cfif>
</cfoutput>
</body>
</html>
Could someone throw me a bone here? :) You can see the error by tryiing this
at http://portcityportlandmaine.com/entrance.cfm
Thanks,
Greg
[EMAIL PROTECTED]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists