Jump to content

Find Exact Match Only


This topic is 7939 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • 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

Link to comment
Share on other sites

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 ]

Link to comment
Share on other sites

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 ]

Link to comment
Share on other sites

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 ]

Link to comment
Share on other sites

  • 1 year later...

This topic is 7939 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.