Im trying to make a simple website fuction, I want a button that displays 1 of 6 random phrases but can only be used once an hour by anyone visiting the site? It must display the same phrase to all who views it?
<? $num = Rand (1,6); switch ($num) { case 1: echo "Relax ... Listen To The Sound Of Your Heartbeat"; break; case 2: echo "Celebrate ... Life's Special Moments"; break; case 3: echo "Connect ... Let Two Become One"; break; case 4: echo "Remember ... Create Memories That Last A Lifetime!"; break; case 5: echo "Remember ... Create Memories That Last A Lifetime!"; break; case 6: echo "Remember ... Create Memories That Last A Lifetime!"; break; } ?> Replace those phrases with your own This is the only thing I can do...but it will put a random phrase to every refresh...not every hour
dude u want that one visitor to refresh it only a hour at max..then u need to save their ip address info too.. search for some similar phps like people can vote only once a day,change it to once a hour and instead of the voting code,put the code that the above person has written,for phrase according to your need