FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Deduct Points Code





Ratmaster
You know that code that can set points per day at 45 and make it lower by 1 every day? Can I use the code or is it downloadable somewhere and I can't find it?
Bondings
Ratmaster wrote:
You know that code that can set points per day at 45 and make it lower by 1 every day? Can I use the code or is it downloadable somewhere and I can't find it?

No sorry, it's not available. But the sql query isn't difficult.
DjinniFire
Well with my rudimentary knowledge of PHP and MySQL just do a query of every use with points and setup if else statement.

Code:

if($hosted=yes){
   if($points>45){
     // Set points to 45 code
   }
   else{
     $points=$points-1;
   }
}


Of course you have to replace the coding with proper mySQL queries and such and proper coding. This is just the "outline" of the concept. Then set this as a cron job to run once a day.
tidruG
I think DjinniFire has got the basic outline right.
Now all you need is the real stuff in the middle Razz
Related topics
Creating a new Operating System
Me Thinks....
Plot Multiple Points on Your Own Map
FriH points and FRIH$
counter strike scource: how to code a door
Do friends matter
Tutorials / PM / Points
Coding ~ Poetry ?
Rvec's PHP shop
Point for reporting
Suggestion for rule regarding copy-paste posts
Subtrat values to a mysql table script
Whats happening with our marketplace?
want to delete first 5 lines in a text file
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Frihost Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.