Jump to content
MakeWebGames

automatic merits


iseeyou94056

Recommended Posts

this only has a little bit in it so that you can get the basic idea and can add only the merits you want them to get

First add this

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

into the db

then add this in the header

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

also add this to the header

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

 

then make a file called awards.php and in it put

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

then you are done just add the awards in that you want your members to get

Link to comment
Share on other sites

Few things i can see wrong on your script so im going to try help you out a bit but im not going to recode it for you..

As Savage mentioned a user could visit the page more than once as your script is now there isnt a way to stop this from happening without upsetting users at level..

example if you told the script to let if($ir['level'] ==5)

then created a STOP function so once they have viewed and gained their Merit it wouldnt allow them to get another merit for level 5

this would then make it so users after that who get to level 10 would'nt be able to gain a merit due to level 5 stopping them.

Same applies for the rest of the script you need to make it so it knows which merit to give then you can stop that merit if its been rewarded then the script moves onto the level 10 merit..

Link to comment
Share on other sites

It's a good idea, but it would be better coded if it were designed for expansion. If I wanted to add another merit, I would have to create another column in the users table and add more if statements to the code. Not exactly ideal, especially if you have many many merits. Something to consider.

Link to comment
Share on other sites

sorry im a little slow lol i dont really understand

 

Few things i can see wrong on your script so im going to try help you out a bit but im not going to recode it for you..

As Savage mentioned a user could visit the page more than once as your script is now there isnt a way to stop this from happening without upsetting users at level..

example if you told the script to let if($ir['level'] ==5)

then created a STOP function so once they have viewed and gained their Merit it wouldnt allow them to get another merit for level 5

this would then make it so users after that who get to level 10 would'nt be able to gain a merit due to level 5 stopping them.

Same applies for the rest of the script you need to make it so it knows which merit to give then you can stop that merit if its been rewarded then the script moves onto the level 10 merit..

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...