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.

Thanks it advance!

No comments posted yet

Your Answer:

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

Image upload - determine folder
I have an upload script that may be accessed from different directories. Problem is, the script is m

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

Posting Serialized Data Not Working
I am trying to send an object from one PHP file to another using POST. I serialize the object and th

need help in update query
hi
i have a dynamic form. i need help in how can i use update query when values from dynamic for

Drop Down and text box issue
Is it possible to set a drop down list and text boxes to a certain width?

here is my code

1,000 select boxes with 100 options?!
I have 1 drop down select box with 1,000 options.


In some case, there will be 100+ of the

search function
HI guys,

if anyone could point us in the right direction of how to do this, or provide some t

Taking an HTML form and a PHP program and making it into one working file.
Hello,

So I would like to display everything INSIDE a specific directory. In other words, I

Query output more than expected
$query=mysql_query("SELECT * FROM players, communities, divisions WHERE dob BETWEEN '{$start_da

Form always sends to error page...
Hello,
Any help will be greatly appreciated. I am having trouble getting multiple fields to be re

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