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

  • Profile Image
    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.


    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 />";





  • Profile Image
    Answered on July 11, 2014 at 08:49 AM


    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.


    This should work like the following form.


    Sample output:

    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.