PHP + jQuery - How to form submit, process and redirect on success?
<p>Stupid question (I seem to be leading all my questions with this phrase), but I was wondering if anyone out there had an elegant solution for processing forms via php and jquery and then redirects</p>

<blockquote>
  <p><strong>[HTML FORM]</strong> --> <em>submits via jquery post to</em> --> <strong>[PHP FILE]</strong> -->
  <em>upon success redirects to</em> --> <strong>[SUCCESS HTML PAGE]</strong>  <em>(and if not success returns back to [HTML FORM]</em></p>
</blockquote>

<p><strong>HTML FORM example</strong></p>

<pre><code>&lt;form action="procRegister.php" method ="post" id="registerAccount" name="registerAccount"&gt;
...fields here ladeeda...
&lt;/form&gt;
</code></pre>

<p><strong>JQUERY POST example</strong></p>

<pre><code>$("form#registerAccount").submit(function(){
    $.post(
        "procRegister.php",
        $("form#registerAccount").serialize(),
        function(data){alert(data.msg);}, 
        'json'
           );   
    return false;
});
</code></pre>

<p><strong>PHP PROCESSING example</strong></p>

<pre><code>&lt;?php
    header('Content-type: application/json');
    $return['msg'] = 'Alright!';
    echo json_encode($return);
?&gt;
</code></pre>

<p>If everything works correctly then the page would pop up an alert box saying "Alright!". Now, how and where would I implement the redirect upon success? i.e. Instead of sending "Alright" how would I redirect the user to, say a CONFIRMATION page?</p>
