|
Use PHP, not JavaScript. The difference between the two is that PHP is server-side, so provided that your server supports PHP (which almost all do), it will work an any computer. JavaScript is client-side, so it will only work if the user has JS enabled (the possibility is low, but still - can't be too safe).
Be aware that you have two different options for this: the afore-mentioned Cookies, and Sessions. Sort of similar to JavaScript and PHP, Cookies are client-side. Meaning that your code will only work if the user's browser accepts cookies. And some browsers have 'security issues' so they won't accept cookies. And, the user may delete their cookies at any time.
Your second option is Sessions. They are server-side, which means that the server will store all the information about whether a visitor has visited in the last 24hrs or not. Plus, the user can't delete sessions like they can cookies. But sessions can be destroyed by the user if they close the browser.
So before you ask for code, make sure you know what you want. There are, of course, a few more unexplored options that would take a while longer to code and set up.
- Steve
__________________
if($stevej == "helpful") { $talkupation += $user_power; }
Last edited by stevej; 04-29-2009 at 11:31 PM..
|