otester Posted August 20, 2010 Share Posted August 20, 2010 I have a PHP random number generator, however this requires page loads to generate another number. If I put the PHP code in a script file, how can I get a button to refresh/update it with an jQuery/Ajax http request? PHP code: <?php $app_ran = Rand(1,6); echo $app_ran; Any help would be great, Thanks, otester Link to comment https://forums.phpfreaks.com/topic/211290-jquery-to-refresh-php-variable/ Share on other sites More sharing options...
otester Posted August 20, 2010 Author Share Posted August 20, 2010 Also this needs to be in PHP as other script rely on it. Link to comment https://forums.phpfreaks.com/topic/211290-jquery-to-refresh-php-variable/#findComment-1101672 Share on other sites More sharing options...
RichardRotterdam Posted August 20, 2010 Share Posted August 20, 2010 Why can't you create a random number with javascript? Link to comment https://forums.phpfreaks.com/topic/211290-jquery-to-refresh-php-variable/#findComment-1101753 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.