Newbies tummah2 Posted July 6, 2001 Newbies Posted July 6, 2001 Hey all! I have a login/password page which, when submitted, does a "-find" action on a database, comparing both the login and password textboxes to two fields in the database (login and password, respectively). My problem is that the "-find" action will allow anyone to enter the site who types in something similar into a login/password in the database. Is there a way to only find exact matches in a database? Thanks, C
neile Posted July 6, 2001 Posted July 6, 2001 Hi, This worked for me: Login:<INPUT TYPE=hidden NAME="login" VALUE="=="> <INPUT TYPE=text NAME="login" VALUE=""> Password:<INPUT TYPE=hidden NAME=Password VALUE="=="> <INPUT TYPE=text NAME=Password VALUE=""> hope that helps neil [ July 06, 2001: Message edited by: neile ]
Partha Posted July 7, 2001 Posted July 7, 2001 Just make your form -lop "AND". It must be "OR" right now That is, <INPUT TYPE="hidden" NAME="-lop" VALUE=AND> Rgds, Partha
Keith M. Davie Posted July 7, 2001 Posted July 7, 2001 The cdml -lop tag is useless as proposed. It will not work as proposed. The only way to get a -lop tag to work is to use it in conjunction with JavaScript which will force the user to input data into the two (or more) fields. To avoid the use of JavaScript, use an exact search of two (or more) fields and standard html/cdml. Variations of the exact search, using other find symbols such as < or ... can be similarly structured. To learn more go to: http://www.filemaker.com/support/index.html Search and read: Article Number: 104829, and Article Number: 105687 [ July 07, 2001: Message edited by: Keith M. Davie ]
Anatoli Posted July 9, 2001 Posted July 9, 2001 You can also validate on calculation field with both values (names).
maska Posted July 10, 2001 Posted July 10, 2001 I use this script to prompt the user to complete both fields: <script language="JavaScript"> <!-- function validatePass() { if (document.formname.login.value == ""){ alert("You must complete the login ID field!") document.formname.login.focus() ; } else{ validatePass2()} } function validatePass2() { if (document.formname.password.value == ""){ alert("You must complete the Password field!") document.formname.password.focus() ; } else{ document.formname.submit()} } //--> </script> Then on your button use a "javascript:validateForm()" command to start the script. I also use this with the <INPUT TYPE=hidden NAME="login" VALUE="=="> <INPUT TYPE=text NAME="login" VALUE=""> etc... to exact the search command. [ July 09, 2001: Message edited by: maska ] [ July 09, 2001: Message edited by: maska ]
sricant Posted October 24, 2002 Posted October 24, 2002 Hi all, Above two codes are not working for me.And i have to check both username and password from my database file.I tried by using if but it only checking one field.Can any one give complete code for this thing. thank you sri.
Recommended Posts
This topic is 8135 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now