Advertisement
Guest User

Untitled

a guest
Jan 20th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <?php
  2.  
  3. //lets try connect to the filemaker instance
  4. set_time_limit(1000);
  5. require_once('FileMaker.php');
  6. $fm = new FileMaker();
  7. $fm->setProperty('database', 'xxxxx');
  8. $fm->setProperty('hostspec', 'xxxxxxx');
  9. $fm->setProperty('username', 'xxxxx');
  10. $fm->setProperty('password', 'xxxxx');
  11.  
  12.  
  13.  
  14. if(Filemaker::isError($connected))
  15. {
  16.  
  17. echo "<p> Connection Error: ". $connected->getMessage() . "</p>";
  18.  
  19. }
  20. else
  21. {
  22. $username = "janedoe@gmail.com";
  23. $password = "pasword2";
  24. $qname = '=="'. $username .'"';
  25. $pword = '=="'. $password .'"';
  26.  
  27. $findCommand = $fm->newFindCommand('Contact Details');
  28. $findCommand->addFindCriterion("user name", $qname);
  29. $findCommand->addFindCriterion("password", $pword);
  30. $result = $findCommand->execute();
  31. //$records = $result->getRecords();
  32. //echo 'Found '. count($records) . " results.";
  33. echo "<pre>";
  34. var_dump($result);
  35.  
  36. if(FileMaker::isError($result))
  37. {
  38. echo "<p> Read Error: ". $result->getMessage() . "</p>";
  39. }
  40.  
  41.  
  42. /*echo "<br><br><br><br><br><br>";
  43. echo "<pre>";
  44. echo "<strong> These are the layouts available</strong><br>";
  45. $connected = $fm->listLayouts();
  46. var_dump($connected);
  47. */
  48.  
  49. }
  50.  
  51.  
  52. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement