The code should be pretty self explanitary. It makes sure you're allowed to change the counter, and that you're putting in a proper number. Then it uses the same principal as previously to change the value in the counter to the new value you've just put in. If all has gone well, it then looks again (this is necessary, otherwise the old value will be displayed... simply incrementing that proves nothing) to confirm the new value and produce a nice message saying it was successful. If not, it informs you of the error.
Not being counted yourself.
This is extremely simple. All you need to do is make a page that will set you a different cookie, telling the web site that you are an adminstrator. Then, when putting the counter value up on the main page, add that as another condition that must be met in order for the number to be increased (you'll have to add that to *both* places where it sets for the "recentvisitor" cookie).
Comments