What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Unable to retrieve data using POST

    Asked by hilltopkennels on January 02, 2016 at 11:30 AM

    I've created a custom web page to send my POST data to at http://hilltopkennels.onlinewebshop.net/redirect.php

    The file redirect.php contains the following code (below in italics) which is supposed to retrieve the relevant fields and create a url. (The url is just simply echo'd for debug purposes at present.)

    <?php

     $ans = $_POST;

     $url1 = "?instId=1068892&cartId=WorldPayTest";

     $url2 = "&testMode=100";

     

     $var1 = "&amp;currency=GBP&amount=".urlencode($ans[amountTo]);

     $var2 = "&desc=".urlencode($ans[BookingRef]);

     

     $urldest = $url1.$var1.$var2.$url2;

     

    echo $urldest;

    ?>

     

    Problem I'm having is that although the ThankYou page of the form has "Send POST data" set, the field values amountTo and BookingRef are not being retrieved. Can you let me know what I'm doing wrong?

     

    Thanks

    Page URL:
    http://www.jotform.com//?formID=60012523022939

    POST retrieve data post data currency
  • Profile Image
    JotForm Support

    Answered by Welvin on January 02, 2016 at 05:48 PM

    You have to enclose the field names using an apostrophe.

    ['amountTo']

    ['BookingRef']

    Please change and that should fix the problem.

  • Profile Image

    Answered by hilltopkennels on January 06, 2016 at 07:52 AM

    All fixed, thanks

  • Profile Image
    JotForm Support

    Answered by Welvin on January 06, 2016 at 09:11 AM

    That's great to know. Please contact us again if we can help in any way.