Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

Hi all I hope this is not a really dumb question since I cannot find a definitive answer anywhere

I am trying to create a retrieve password option from a web page. And since I am a beginner at FileMaker this is really confusing compared to how I would do this ftom php /SQL. BTW my code for adding,searching and retrieving records from PHP is working so I know I have connections to the database.

Basically I would like to

$newPerformScript = $fm> newPerformScriptCommand($layout_name, $script_name, $parameter);

$result = $newPerformScript->execute

With $parameter = to the users email address

And $script_name = to the script on the fm database

How do I pick the parameter in. Fm script ?

How do I then search the table for this parameter ?

When I match this email how do I return this users password in an email to that user ?

How would I return the result of this to my php to display a success state. ?

I am obviously missing something really basic about how scripts work.

Kind Regards

Posted

First of all, storing passwords in a field is a VERY insecure method.  You are much better off using FileMaker's accounts and password functions. If a user forgets a password, it is far better to create a new random one and use the Reset Account Password step, and allow the user to change it if she desires.  This keeps passwords securely encrypted deep within FileMaker.

 

If  a parameter is sent to a script, one of the first steps in the script should be 

 

Set Variable[$param; Get(ScriptParameter)]

 

Then, you search for the parameter by

 

Enter Find Mode

Set Field[YourEmailField; $param]

Perform Find

 

You would send email with the Send Mail script step, using the field YourEmailField as the To: address.  The body of the email would be a calculation such as 

"Your password is " & ThePasswordField & "."

 

To determine completion of the script, have a Set Field[TheFlag; 1] step in the script, and then use  newFindCommand('YourEmailField'); getRecords() ; getField('TheFlag') in the php script.  Have the php script reset TheFlag.

 

 

This topic is 4147 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.