Novice needs your help!!!
Posted: Tue Feb 25, 2003 12:54 pm
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.
The code for ads is
and the MySQL query is
The person who wrote the code only supports it when its paid for but the trouble is I have to pay for it to find out if it can be modified. Catch 22.
Thanks
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.
The code for ads is
Code: Select all
$ad_numCode: Select all
if (!$credits)
{
$sql = "update $usr_tbl set credits = 0 where email = '$valid_user'";
$r = mysql_query($sql);
}
if ($credits < 1 and !$siteid)
{
print "<hr />$la_credits_warning";
$la_to_addcre = ereg_replace("\{PAYMENTPAGE\}", "<a href='payment_options.php'><b>paymentpage</b></a>", $la_to_addcre);
print "<p />$la_to_addcre.<hr />";Thanks