Returning PHP value to the page
<p>I have a remote php program that generates 2 random numbers, I call to it on my form page to populate a text box used in validation. I can't get it to return the numbers.</p>

<pre><code>&lt;?php
    $randomNum = rand(0,9);
    $randomNum2 = rand(0,9);
    echo ($randomNum + $randomNum2);
    $randomNumTotal = $randomNum + $randomNum2;
?&gt;
</code></pre>

<p>It is returning the total, not # + #
Please help!</p>

<p>OK, thanks to the help below I got the output to be correct on the page. What I'm doing is the parent page brings in forms via AJAX. The forms are validated by a remote PHP script "random.php" in the forms there is a math problem for a somewhat human verification, the math problem is populated by the "random.php" file via .get command. Got that working. The issue now is that I can't solve the problem correctly... the answer input has this validation:</p>

<pre><code>SomeName: {
    equal: "&lt;? php echo $randomNumTotal ?&gt;
}
</code></pre>

<p>but it's  not working...any ideas?</p>
