about scale rating, how can I get the post data from thanks you page using php

  • baby3873575
    Asked on July 11, 2014 at 12:15 AM

    HI, I just wanna get the scale rating data, on my thank you page I use:  but I can't get the value of scale rating,

    I only get the key of scale rating but not value.

    <?php

    header('Content-Type: text/html; charset=utf-8');

    foreach($_POST as $key => $value){

            print "key is ".$key."<br>";

    if($value !== "" && $key !== "formID" && $key !== "ip"){

    if (is_array($value)){

    foreach($value as $arrkey => $arrval)

    {

    print "Field ".htmlspecialchars($key)." is "."$arrval <br/>";

    }

    }

    }

     

           else {

         print "Field ".htmlspecialchars($key)." is "."$value <br />";

           }

    }

    ?>

     

  • Elton Support Team Lead
    Replied on July 11, 2014 at 8:49 AM

    Hi,

    The problem is within your conditional statement.

    if($value !== "" && $key !== "formID" && $key !== "ip"){

    If you want the non-array field values to display, I think you should make the conditions like the following but this does not display the array field values. "is equal ==" instead of "is not equal !=="

    if($value == "" && $key == "formID" && $key == "ip"){

    If you want everything to be displayed without exemption even if non-array or array, you can use the following.

    if(is_array($value)){

    This should work like the following form.

    http://form.jotformpro.com/form/41913126680957?

    Sample output:

    about scale rating, how can I get the post data from thanks you page using php Image 1 Screenshot 20

    You can take the final script here if you like. http://pastebin.com/raw.php?i=Hktngbng

    If you need further assistance, let us know.

    Regards!