Jump to content

need help with advance membership php script


seuges

Recommended Posts

hi, everyone im kinda new at this programing thing, but for the past months i have been doing it mainly on my own. im at a really tuff obstacle, and would really appreciate if someone could assist me.

 

so i have decided to build a membership site and i want to have an option where depending on the type of membership, a person selects. they will have access to a limited amount of free items. now what i would like to do, is create a script that will some how count the amount of time the user accesses a link, lets say, 20 is the given amount of free items. if the member clicks that link 20 times then it will be disabled. thats what i want to be able to do, it mayb appear simple to most of you, but to me its a total headache. i would really appreciate if possible an example script or just some useful tips. by the way im using php designer to write the php codes and im using dreamweaver to create the site.

 

thanks in advance for any post to this, both +ve and -ve ones  ;)

 

Basically you'd create a mysql table that tracks number of times a given link is clicked by user id.  When displaying the page you'd check to see if their total amounts of clicks has reached the max allowed, if it hasn't show the link. 

 

For the link, setup a redirect so when clicked it'll go to a redirect page and increment the page view for that link, then redirect again to the correct page.  One thing you might want to do, is run a check on the page being viewed that does the same check as the one mentioned in the first paragraph just to make sure users don't bypass the link and go directly to that page.

 

Hope that makes sense.

thnks for the replies. i have considered both of these ideas thanks to you guys and im going about executing them rite now. but i would still aprreciate if i could get some more advice or ideas, just in case the given are a bit over my head.

 

Thanks alot again.

well im a bit lost now, tell me how exactly to construct a table that would count the amount of times a link is pressed. like for example wat variables do i need to add to the table and values. i was thinking maybe i would need also to add a sql. that would probably select a link from another table when the value becomes greater than the given amount.

 

so what exactly would be the best route to take.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.