Post form data to a new page and show that page with the posted data
<p>I have: 
form.php
preview.php </p>

<p>form.php has a form in it with many dynamically created form objects. I use jquery.validation plugin to validate the form before submitting. 
submit handler: </p>

<pre><code>submitHandler: function() {
             var formData = $("#myForm").serialize();
            $.post("preview.php", {data: formData },function() {
    window.location.href = 'preview.php';
});
</code></pre>

<p>Question: 
- How to change the current page to preview.php and show the data? my submitHandler doesnt work? Any tips? </p>

<p>preview.php:</p>

<pre><code>$results = $_POST['data'];
        $perfs = explode("&amp;", $results);
        foreach($perfs as $perf) {
            $perf_key_values = explode("=", $perf);
           $key = urldecode($perf_key_values[0]);
           $values = urldecode($perf_key_values[1]);
        }
        echo $key, $values;
    enter code here
</code></pre>
