Jump to content

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

Recommended Posts

  • Newbies
Posted

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

Posted

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 ]

Posted

Just make your form -lop "AND".

It must be "OR" right now

That is, <INPUT TYPE="hidden" NAME="-lop" VALUE=AND>

Rgds, Partha tongue.gif" border="0

Posted

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 ]

Posted

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 ]

  • 1 year later...
Posted

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.

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 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.