[FX.php List] Find an email using FMS7A and PHP 5.0.2
Andy Gaunt
andy at fmpug.com
Sun Jun 5 12:23:20 MDT 2005
Jason -
This is exactly the direction I ended up taking, but it would still be nice
to either know why you cannot find an email address in 7.
I don't want to set account names into the file itself as these accounts are
generated from a PayPal confirmation and then need to be tracked on how long
the user has been a member and a whole heap of other stuff.
Regards
Andy Gaunt
T: 407.810.4722
<mailto:andy at fmpug.com> andy at fmpug.com
<http://www.fmpug.com/> http://www.fmpug.com
June 23rd 2005, 7pm Orlando FMPug
Register interest online at <http://www.fmpug.com/rsvp>
http://www.pug-planet.com/rsvp.php
_____
From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jason H Awbrey
Sent: Sunday, June 05, 2005 10:21 AM
To: FX.php Discussion List
Subject: Re: [FX.php List] Find an email using FMS7A and PHP 5.0.2
Hi Andy,
The way that I have dealt with this is to simply replace the '@' with
another character and then use that iteration for my username in the
database. Then simply replace the '@' in your PHP script with the character
you are using in the database. For instance,
$username = preg_replace('/@/', '.', $_POST['username']);
This way your users can still use their email address as their username.
A better way of validating a user is to create an account in the database
for that user. Then using the same preg_replace() statement above you could
use the following:
$test = new FX($serverIP, $webCompanionPort);
$test->SetDBData ('login', 'login');
$test->SetDBPassword($password, $username);
$login = $test->FMFindAll();
If the login is a valid account, they have access to the database. If not
give them an error to try again or kiss off. ;-)
HTH,
Jason H Awbrey
Harmonic Data Associates
http://www.harmonic-data.com
jawbrey at harmonic-data.com
On Jun 4, 2005, at 2:36 PM, Andy Gaunt wrote:
Hey guys -
I have a slight issue right now using an email address in a login solution.
It seems it does not like the email address being used as the username, even
if I enclose the email in "s
This works fine in FM6 unlimited and PHP4.3 but fails in FM7
$username=$_POST['username'];
$password=$_POST['password'];
$checklogin=new FX($serverIP,$webCompanionPort);
$checklogin->SetDBData(,);
$checklogin->SetDBPassword(,'');
$checklogin->AddDBParam('Username',"==");
$checklogin->AddDBParam('Username','"'.$username.'"');
$checklogin->AddDBParam('Password1',"==");
$checklogin->AddDBParam('Password1',$ password);
$checkloginResult=$checklogin->FMFind();
Regards
Andy Gaunt
T: 407.810.4722
<mailto:andy at fmpug.com> andy at fmpug.com
<http://www.fmpug.com/> http://www.fmpug.com
June 23rd 2005, 7pm Orlando FMPug
Register interest online at <http://www.fmpug.com/rsvp>
http://www.pug-planet.com/rsvp.php
_______________________________________________
FX.php_List mailing list
FX.php_List at mail.iviking.org
http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20050605/9df1bd7d/attachment.html
More information about the FX.php_List
mailing list