Passing a mixture of Javascript variables and PHP variable in a SESSION
<p>I have a form in where a user inputs certain info and they get back some info via Javascript.</p>

<p>I want to pass the info from the Javascript on to another page.  Although, in the form which the user inputs in, there is an Input field which I want to pass through to the next screen as well.  I know I can pass this Input field through $POST and session, but it's the Javascript fields I'm struggling with.</p>

<p>Here is my form (I'll show one field as to not flood the screen with code):</p>

<pre><code>//I added this hidden field and it stopped my javascript form updating//
&lt;input id="amount" type="hidden"&gt;
//===========================================================// 
&lt;input class="applyForm-input"  id="amount" name="amount" type="text"  autocomplete="off" maxlength="6" style="position:relative; left:200px; top:-24px;"&gt;
</code></pre>

<p>Here is where it is output via Javascript:</p>

<pre><code>&lt;div class="loanForm-totalToBorrow v-number" id="amountdiv"&gt;
</code></pre>

<p>Here is my Javascript for this particular field:</p>

<pre><code>function updateCost() {

var amount = parseFloat(document.getElementById("amount").value) || 0.00;
    delivery = parseFloat(document.getElementById("delivery").value);
        if(delivery !='select' &amp;&amp; delivery)
        {
            delivery=parseFloat(delivery);
        }
        else
        {
           delivery= 0.00;
        }
    total = amount + delivery;
    fixedrate =  total / 100 * 12.2;
    grandtotal = fixedrate + total;   

document.getElementById("amountdiv").innerHTML = amount.toFixed(2); 
</code></pre>

<p>Now I know PHP is serverside and Javascript is Client side.  So how would I pass this data to a PHP variable.  </p>

<p>On my second page, I want to output some of the sessions.  An example of one below:</p>

<pre><code>&lt;?php
echo ' &lt;tr class="blah1"&gt; ';
echo ' &lt;td class="blah2"&gt;&amp;#163;' . $_SESSION['amountdiv'] . ' &lt;/td&gt; ';
echo ' &lt;/tr&gt; ';
?&gt;
</code></pre>

<p>I've looked through stackoverflow and people mention hidden input fields.  Although, when I add these, my Javascript stops working.</p>
