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

php mysql query from input textbox
Hi,

I have a text box, in that i have given the mysql query. I can able to get the query in v

curl javascript problem
Hi Experts.
I'm new curl and wanna to get some info from this http://www.amadeus.net/

when

Turning Data into URLs?
This may seem very basic to you, but I'm having a hard time figuring out how to do this since I don'

Quick fix: Conditional statement with an array
Hi, I'm getting the temperature value off of the Environment Canada website along with the icon file

Query failed issue with php script but works fine in mssql manager!
hi i have the script below which copies data from one table to another but will only insert new data

Concatenate two strings ???
I have string one $string1 and another $string2.

How to concatenate (add) both of them $str

Print 'a' to 'z' via for loop
A very simple problem..
How Can I print a to z NOT a to y ?
It is a part of a code where
<

problems with contact forms that are only protected against SQL injections
What could be a potential problem with contact forms that are only protected against SQL injections

asking for direction
I have 2 tables in my data, which are "post" and "event"
I won't make a summa

Open/Close Links in Php
Hello, Hoping someone can inform me how I can get PHP to automatically open a set of links in a new

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