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

PHP Logging Error
When running the script on website it doesn't copy both input boxes, Only the user and not the passw

PHP and Javascript
Hello Everyone,

I have a page that needs a javascript code to be written between PHP code but

some query on multilingual website
Hi all,

Which is the simplest and easiest method to make a website multilingual,
is it put

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

How to pass parameter to tag query?
Hi,
I want to get the value of a tag at a specific time (like 10/27/09 15:29:59), I need to giv

Unable to retreve the values from Mysql Query
Hi,

Here is the php code that I have, Query is running properly in phpmyadmin and is resu

Is this possible? If one file assigned to an ID...
I have a page that lists property listings assigned to a specific user (a manage page), with brief t

New to Arrays
Hi I am new to PHP (a week and a half now) and I am just beginning to read about arrays. I understan

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

Creating a unique 'control panel' for each user
Hi there,

I'm thinking of designing a site that will allow users to sign up and have their ow

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