[FX.php List] Find an email using FMS7A and PHP 5.0.2

Michael Layne fx at 9degrees.com
Mon Jun 6 09:06:34 MDT 2005


You're right.  Here's what I do and it works well...

in FM7:

field: email (text)
field: password (text)
field: email_password: (calc - Substitute ( email ; "@" ; "" )& "." &  
password)

in PHP:

$user = str_replace("@","",$_POST['user']);
$userpass = $user . "." .  $_POST['pass'];

$q = new FX($ip, $port);
$q->SetDBData($db,$lay);
$q->AddDBParam('email_password',$userpass);

$r = $q->FMFind();
$d = current($r['data']);

So, I'm dealing with the '@' on both sides.  I have used this on  
several solutions.

HTH,

Michael


On Jun 4, 2005, at 3: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
>
> andy at fmpug.com
>
> http://www.fmpug.com
>
>
>
> June 23rd 2005, 7pm Orlando FMPug
>
> Register interest online at 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/20050606/a0263df6/attachment-0001.html


More information about the FX.php_List mailing list