Balderick 0 Posted January 31, 2017 Report Share Posted January 31, 2017 <?php if (empty($count)) { $count=''; } if ($count == '') { $count ='1'; } else { $count++ ; } echo $count; echo '<br>'; ?> My goal is to make a script that increments $count ever time someone downloads the page. Can this be done without 'storing' the $count value? Or should I create a script with fwrite/fopen or $_SESSION? Quote Link to post Share on other sites
justsomeguy 1,135 Posted January 31, 2017 Report Share Posted January 31, 2017 If you want it to be persistent with all users then you need persistent storage, either a file or a database. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.