Php data to jquery variables
<p>Please see the </p>

<pre><code>&lt;?php
if($_POST['submit'])
{
$beg=$_POST['basic'];
}

if($_POST['inter'])
{
$int=$_POST['int'];
}

if($_POST['advance'])
{
$adv=$_POST['adv'];
}
?&gt;

function refreshPrices() {

   var beg=&lt;?php echo $beg; ?&gt;;
   var inte=&lt;?php echo $int; ?&gt;;
   var advn=&lt;?php echo $adv; ?&gt;;


    var currentTotalValue = 0;
    currentTotalValue = currentTotalValue + parseInt(beg) + parseInt(inte) + parseInt(advn);
    $("#results div").each(function() {
        if (!isNaN(parseInt($(this).find("span").text().substring(1)))) {
            currentTotalValue += parseInt($(this).find("span").text().substring(1));
        }
    });


    $("#totalValue").text("$" + currentTotalValue)
}
</code></pre>

<p>If i add one variable from php and add them to current total in jqery function,it is working fine but if i add 3 varibles and them to jquery total it is not working,in my html i have 3 buttons with different hidden values just to post them to second page what ever the value it will be added to jquery total.</p>
