[FX.php List] Results of FMNew()
Charles Ross
chivalry at mac.com
Mon Dec 12 05:21:42 MST 2005
Andy,
> I believe an operator of 'eq' on both would find what you wish.
That's what I tried first. My Logins table has a single record.
EmailAddress = "chivalry at mac.com", Password = "1234". Here's the line
of code that sets the database parameters:
$search->AddDBParam('Password', $Password, 'eq');
$search->AddDBParam('EmailAddress', $EmailAddress, 'eq');
Searching for EmailAddress = "chiv", Password = "1234" successfully
brings up the record when it shouldn't. Change the code:
$search->AddDBParam('Password', '=='.$Password);
$search->AddDBParam('EmailAddress', '=='.$EmailAddress);
Now it doesn't find the record when it should. Searching for
EmailAddress = "chivalry at mac.com" and Password = "1234" does not
bring up the record. Change:
$search->AddDBParam('Password', '=='.$Password, 'bw');
$search->AddDBParam('EmailAddress', '=='.$EmailAddress, 'bw');
Also doesn't find the record when it should. Maybe the @ symbol is
causing problems because FM considers it a wildcard character. Change:
$search->AddDBParam('Password', '=="'.$Password.'"', 'bw');
$search->AddDBParam('EmailAddress', '=="'.$EmailAddress.'"', 'bw');
Searching for "chivalry at mac.com", "1234" works correctly, but the
record is also found when searching for "chivalry", "1234";
"hivalry", "1234". Change:
$search->AddDBParam('Password', '=="'.$Password.'"', 'eq');
$search->AddDBParam('EmailAddress', '=="'.$EmailAddress.'"', 'eq');
I'm just trying randomly now. This one never finds the record.
> We use a strict login system for both fields on FMPug (which in
> case you were wondering is entirely FileMaker and FX.PHP driven.
> Even our new footer banners are coming out of FileMaker Pro on a
> rotating banner schedule) and in the new year will also be making
> this case sensitive for both username and password.
>
> We also ensure that both fields have been filled in first. If they
> have not then we use a header redirect to a login failed page
> before we even try to connect to the FileMaker database.
Any hopes of seeing the way you do your login system? Right now, I'm
leaving the code in the second to last state above, as at least it
allows me to fake the login system working correctly so I can move
onto other features.
Thanks,
Chuck
More information about the FX.php_List
mailing list