[FX.php List] Passing variables for forgotten password

Andrew Denman adenman at tmea.org
Thu Sep 11 11:08:07 MDT 2008


Josh,

 

If the username and password are coming from the database they won't be in
the $_POST variable.  You will have to get the FileMaker data from the
returned set. This code assumes you are only finding one record and it is
getting data from the first record returned:

 

list($key, $data) = each($FXReturnData['data']);

$user = $data['Username'][0];

$pass = $data['Password'][0];

 

The FX.php readme briefly covers how the data is returned
(http://www.iviking.org/downloads/README.pdf), and there is a diagram in the
FX.php documentation folder that you downloaded if you need more details.

 

Andrew Denman

 

From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Josh Shrier
Sent: Thursday, September 11, 2008 11:32 AM
To: 'FX.php Discussion List'
Subject: [FX.php List] Passing variables for forgotten password

 

I have a screen that the user enters their e-mail address to retrieve a lost
password. When the user submits that form it takes them to a page which uses
a PHP query to send the email. I am trying to pull the username and password
as variables so as to add them in the message body. That doesn't seem to be
working. This is the code I am using. Can someone please help me.

Everthing works but the username and password variables into the
$messagetext.

 

$user=$_POST['Username'];

$pass=$_POST['Password'];

 

<?

$mailto = 'josh at boatrentalsoftware.com' ;

$subject = "Password Forgotton" ;

$formurl = "http://www.yourwebsite.net/page1.htm" ;

$errorurl = "http://www.yourwebsite.net/emailerror.htm" ;

$thankyouurl = "http://profitprofessionals.pointinspace.com/emailsent.php" ;

$messagetext= " \n\n"."Username=".$user

."\nPassword=".$pass."\nemail=".$email."\n\n \n";

 

 

$email = $_POST['Customer_Email::Phone_Number'] ;

 

 

$http_referrer = getenv( "HTTP_REFERER" );

if (!isset($_POST['Customer_Email::Phone_Number'])) {

header( "Location: $formurl" );

exit ;

}

 

mail($mailto, $subject, $messagetext, "From: \"$name\"

<$email>\nReply-To: \"$mailto\"

<$email>\nX-Mailer: chfeedback.php 2.01" );

header( "Location: $thankyouurl" );

exit ;

?>

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20080911/7a5fa1b5/attachment.html


More information about the FX.php_List mailing list