Jump to content

Counting something...


al3x8730

Recommended Posts

I want to record the number of times something has been done, in this case how many a user has searched my database. Within the search thing I thought about adding a ++ to a variable. But that wouldn't save each time. How would I go about doing this so that everytime a user does something it adds 1 to a variable, but that variable saves so it doesn't reset to 0 each time..

Link to comment
Share on other sites

You want to have a number stored in a file, and you want to increment that number each time something happens right?  That's the same principle as a hit counter.  If you google hit counters, you will find plenty that use a flatfile that simply open a file, increment the value, and close it, the end. 

 

Or are you saying that you don't want to use google, you'd rather be spoonfed stuff?  Because that's not how it works around here.

Link to comment
Share on other sites

You want to have a number stored in a file, and you want to increment that number each time something happens right?  That's the same principle as a hit counter.  If you google hit counters, you will find plenty that use a flatfile that simply open a file, increment the value, and close it, the end.   

 

Or are you saying that you don't want to use google, you'd rather be spoonfed stuff?  Because that's not how it works around here.

 

Haha. Sorry for the misunderstanding, I thought you ment to use "Google Hitcounter" And I don't want to use a hitcounter. Sorry about that.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

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.