Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Filemaker Server Advanced 7 php login w/session ex

Featured Replies

  • Newbies

Does anyone have an example of login into filemaker Server advanced 7 with a php session or cookie that records the username and password typed into a form and so that it passes to each pages.

using fx.php

  • Author
  • Newbies

Here is what I have so Far. It is not working right. I have not found an example for what I am trying to accomplish. Hoping someone can look at this code and tell me what I am doing wrong.

Login.php


<?php

include_once('FX/FX.php');

include_once('FX/FMErrors.php');

include_once('FX/server_data.php');

?>



<html>

<head>

</head>

<body>







<br><form method='post' action='authentication.php'>



User Name<input type='text' name='uname' value=''><br>

Password<input type='text' name='pname' value=''><br>



<input type='submit' name='submit' value='Submit'>

</form>



</body>

</html>







authentication.php





<?php

$uname=$_REQUEST['uname'];

$pname=$_REQUEST['pname'];



session_start();

$_SESSION[uname] = $uname;

$_SESSION[pname] = $pname;



echo "you have logged in successfully";









?>

<br>



<a href="findeng.php">Click Here to proceed</a>







find.php





<?php

include_once('FX/FX.php');

include_once('FX/FMErrors.php');

include_once('FX/server_data.php');





session_start();



$groupSize='50';





$results=new FX($serverIP,$webCompanionPort,'FMPro7');

$results->SetDBData('bidsengr.fp7','Table View',$groupSize);

$results->SetDBPassword($_SESSION[uname],$_SESSION[pname]);







$resultsResult=$results->FMView();





foreach($resultsResult['data'] as $key=>$resultsData);







?>

Your "login.php" does not need the php code. However the "authentication.php" page needs this code:

<?php

include_once('FX/FX.php');

include_once('FX/FMErrors.php');

include_once('FX/server_data.php');

?>

Good Luck.

Garry

  • Author
  • Newbies

Thanks guys for all the help. The code above actually does work.

I had some priveledge set issues in filemaker.

Does anyone know how to encrypt the password so it doesn't show up in plain text.

I will probably figure it out but if anyone could point me in the right direction I would appreciate it.

Thanks again.

Password field

On your form use field type 'password' and you should be good to go.

Also use 'Post' rather than 'Get' when sending your form.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.