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.

Featured Replies

Ive attached my code pages.

The issue i have is if the login credentials is correct it redirects great but of not then it doesn't work and displays an error of below. Whats goin wrong? I used some of the functions from a plugin that i own to play with and they work just not if its wrong login.

 

 

 

login.zip

What error? You also have the call to error.php commented out in login.php

  • Author

What error? You also have the call to error.php commented out in login.php

the error i get is Fatal error: Call to undefined method FileMaker_Error::getRecords() in /home/mjohnson/public_html/ergo/login.php on line 101.

 

Yea i have it commented out for now but if i re-enable fmpTrapError($result, "error.php"); function then i get the above if it try to login with the wrong credentials but if i login with correct credentials then it redirects to LoginSuccessfull.php like its suppose to.

  • Author

still having issues. I rearranged the getrecords() function to go below the Filemaker::iserror($result) and it doesnt give me the above error but the fmpTraperror or fmptraperror2 not the standard header redirect doesnt go to the error page like its suppose to. 

 

fmpTrapError is the standard error function that gives me filemaker's errors but i modified it with fmpTrapError2 to pass my own errors if i want to so if someone can look at that and make sure im doing it right that would be great.

error.php

login.php

Functions.php

defines.php

  • Author

ok i got it to redirect finally. it was an error on my error.php page with session start etc on top with a redirect back to login which was working correctly.

 

My only issues now is, and i've uploaded the updated pages, is on line 24 or so, theres an fmpTrapError2 function that im passing my own message into along with the error code that doesnt seem to work properly on the error page. Not sure if im doing it right or not in the function.

Functions.php

error.php

login.php

  • Author

One more question, how to i write that fmpTrapError2 function to not only go to an error page but also give me a url in a variable that i can echo out to that go back to previous page button so they can click the button and go back if i wanted them to? obviously i have the navigation so they can click whatever but id like to have it just in case.

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.