sky2k: The code I'm trying to figure out is how to create levels...for example there is 10 items for sale...but only item 1 is viewable cos the others are locked...now the person has to has to play the unlocked item like 20 times until he gets to the next level...but he wouldn't unlock the next item in level 2 cos only when he makes enough points then the next item will unlock...well I know how to code the points to unlock the next item but I'm struggling with the level system atm....any ideas?
Assuming you just want to test for entitlement it sounds like you simply want a column on your users table for the total sales and level, then after each sale call those values.
And then
if (*level
less than 2 && sales > 19 )
mysql_query( "update users set level =2" );
Or if the levels are going to be predetermined by sales anyway you can just use the total sales variable to define the level on the sales page
if (*sales >19) *level =2;
if (*sales > 39) *level =3;
etc
I hope I understood what you wanted correctly.