Hello, I could really use some help understanding something. Why does php have to refresh the whole page for a function to continue? For example.
<?php
$getfile = rand(1,5);
$includefile = "file" . $getfile . ".txt";
include ($includefile);
?>
Gets .txt randomly but in order for it to get a new random item the page needs reloaded or refreshed.
And in javascript the whole page doesn't need refreshed but just the function.
I know its because its a server side command but that doesn't tell me much. I need to understand "why" it must be the whole page, then I will know how to fix other problems. Thanks!