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.

Form (Method = POST) & 'LinkNext' on Results Page

Featured Replies

I have a simple form which queries a database with thousands of records. The form takes twenty inputs, too much for using GET (the URL is about 500 characters long). POST works great. I want to show 50 records at a time and jump from group to group. The search part works fine.

I use the 'Link Next' and 'Link Previous' commands on the search results page. When I click them, I get zero records.

How do I get the page to remember the found set but advance the $skip setting when POST is used? (It worked great with GET before the URL got too long.)

I have explored every resource I can find, but aside from Chris Hansen's FXExamples.php (which is not a form), I cannot find an actual example which parallels my situation or even uses these Link commands. Does anyone have the code of an (ANY!) example of this that you could include in a response?

I can't wait to get my hands on VisualFX for Dreamweaver so I can see how this code is supposed to work!

With appreciation,

Dave

You can use the CURL functions to POST from PHP. For example:

<?php

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, "http://localhost:1154/FMPro");

curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_POSTFIELDS, "-db=combotest.fp5&-format=-fmp_xml&-findall");

curl_exec($ch);

curl_close($ch);

?>

Hope this is of interest.

Garry

p.s. I've just realised that you want to do the POST from the page. You may have to build a Form with [FMP-CurrentFind] and some Javascript.

  • Author

Garry,

Thanks, as always, for your reply. I was on vacation. Sorry for delay in getting back.

I made use of your idea in the P.S. I built forms for linkNext and linkPrevious which submit the last stored POST query with an updated (calc) skip entry. Buttons instead of links. Works great.

I always learn something from your responses. Thanks for the push!

Dave

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.