jquery - Returning PHP value to the page -


i have remote php program generates 2 random numbers, call on form page populate text box used in validation. can't return numbers.

<?php     $randomnum = rand(0,9);     $randomnum2 = rand(0,9);     echo ($randomnum + $randomnum2);     $randomnumtotal = $randomnum + $randomnum2; ?> 

it returning total, not # + # please help!

ok, below got output correct on page. i'm doing parent page brings in forms via ajax. forms validated remote php script "random.php" in forms there math problem human verification, math problem populated "random.php" file via .get command. got working. issue can't solve problem correctly... answer input has validation:

somename: {     equal: "<? php echo $randomnumtotal ?> } 

but it's not working...any ideas?

you use . in php string concatenation

try $randomnumtotal = $randomnum ."+". $randomnum2;


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -