On page view, minus credit


Posted on 16th Feb 2014 07:03 pm by admin

Hello all, please, I need a little help with this script. I am charging one credit (credits can be purchased, but that is unrelated) for view of a certain page. I need help in figuring out what php I need to add to each of the articles I want to charge for. Here is what I would like:

On view, if $balance is more than 0, subtract one credit. If $balance is less than 0, have page redirect to, oh for sake of example, google.com. Also, not sure if it would change, but I would also like the code for the same thing, but instead of $balance, if it were just a variable called VBalance.

Did you know?Explore Trending and Topic pages for more stories like this.
Thanks it advance!
No comments posted yet

Your Answer:

Login to answer
101 Like 21 Dislike
Previous forums Next forums
Other forums

FFmpeg Images 2 Video conversion problem ??
I got folder full of images , number of images = 600 , I want to make a video which plays one image

Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a ba

Checkbox info wont include in Mailto
Hey, im new to php.
Basically I have made a form to request which type of job(s) are needed, whic

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

Getting number of affected rows in SQLPLUS..
Hi everyone,
I have a shell script where i am invoking sqlplus, running a query and saving t

Blank record injected into database
I always found several blank records inside my database, although $SESSION is required to insert the

MS Exchange 2007 integration with ECC 6.0
Hello Experts,
We have ECC 6.0 and MS Exchange 2007. We need to integrate ECC 6 and MS Excha

parse error
On my local machine I keep getting parse error for my footer. When I put it online, it doesn't show

Display a default image
I am trying to display generic image for items that don't have one, but I can't get it to display.

getting a website's source code as a variable? How?
Hey guys, is there any way for me to get the source code of a website as a variable for me to work w

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash