Hi,
I know very little about php and am desperate for some help. I have a classified program that can have credits allocated to the user. e.g. 50 credits = 50 ads. The problem is when an ad is deleted it removes a credit and leaves the user with 49 credits and admin has to re-credit them. I can stop the program from removing the credit but it leaves the user with unlimited ads. Now this bit of code, when the user reaches zero credits, sends them to a payment page, but if it was altered so that it sent them when ads = credits, that would solve the problem.
Hi,
if you do that, the user ends up with unlimited ads as there is no way to check how many ads have been placed. It only stops the user from placing ads when credits = 0. Further up the file is code that deletes a credit when an ad is placed and I can stop the program from deleting credits when an ad is placed.
The code I have shown checks how many credits are left and if 0 send the user to the payment page. If the query was
it would direct the user when ads = credits to the payment page but that alteration does not work and its probably because the way I have written it is wrong. " if ($credits = $adnum and !$siteid) "