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

How to show the difference between two data field in a database with php.
Hello php gurus,

how r u all... i'm not so well facing a typical problem please help me...<

GET vs SUBMIT Button to show sections on one index.php page?
Just curious if one of these ways is better (i.e. more efficient) than the other.

I have a

My query is being run with no results.
I have this.

Code: function DropUser($duser_id, $user_email, $user_username) {

Install page
How do I make it so when a user submits information on the Install page, it'll right it into the cor

MFC GUI Programming
I am working on a project right now that requires me to create a MFC Windows GUI. Basically it need

newbie question about multiple queries
hi everyone,
I'm sorry to ask such a basic question, but I'm young and trying to learn php on my

Why is this function returning a false value when it shouldn't be??
This is in an include file. I want it to check a value in an html form and see if it's just white s

Remove values in array2 from array1
I have two arrays.

Array 1 is where the array key holds various different numbers. For exampl

EXplanation help
Hey all,

I am still fairly new to PHP programming and I am trying to put together a page wher

Data Function is Its Not working IN IE8
This is my first time to use formums. I hope i can get solution for this problem. view plaincopy to

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