repost all $_POST variables

$postKeys = array_keys( $_POST );
foreach( $postKeys as $key ){
echo "<input type='hidden' name='$key' id='$key' value=".$_POST[$key]." />";
}

1 Comment

You must be logged in to post a comment.


  1. Oops, there should be quotes around the value in the input tag

    value='".$_POST[$key]."'
    - notice the extra '

    so the line, in full should be:

    echo "";