July 6, 200124 yr Newbies 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
July 6, 200124 yr 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 ]
July 7, 200124 yr Just make your form -lop "AND". It must be "OR" right now That is, <INPUT TYPE="hidden" NAME="-lop" VALUE=AND> Rgds, Partha
July 7, 200124 yr 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 ]
July 10, 200124 yr 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 ]
October 24, 200223 yr 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.
Create an account or sign in to comment