[PHP] Problem with Subscription PHP? [UberCMS]

Joined
Nov 6, 2010
Messages
1,561
Reaction score
394
So I'm working on a VIP Subscription system for UberCMS, where when a user accesses your me page, it'll check to see if the time is greater than the expiration date, and it will delete the row.

Page loads fine and everything, but it won't query the delete. :L Code:

PHP:
<?php }} ?>

<?php if($users->GetFriendCount(USER_ID, true) != "0"){ ?>
<li id="feed-friends">
<strong><?php echo $users->GetFriendCount(USER_ID, true); ?></strong> You have 
<span>
<?php
$time = time();
$subresult = mysql_query("SELECT ts_exp FROM vip_subs WHERE user_id = '".USER_ID."'");
 if ($subresult < $time)
 {  
 $delsub = mysql_query("DELETE * FROM vip_subs WHERE user_id = '".USER_ID."'");
 }
 else
 {
 print hello;
 }
 ?>

This also has everything that I see as important in it (Stuff in its general area that might affect it).

:P Ive coded that myself, taken a while. Please, point out the newb stuff I've done :D:
 
try..
PHP:
$subresult = mysql_query("SELECT ts_exp FROM vip_subs WHERE user_id = '".USER_ID."'");
$result = mysql_fetch_array($subresult);
 
 if ($result["ts_exp"].....
 
Last edited:
Upvote 0
Strange it worked fine when I tested it last night.

Sent from some remote location using Tapatalk...
 
Upvote 0
Yes but u will have to do something about the USER_ID. Maybe that's why it did not work for you? Just use some echo's the see if the variables return anything.

Sent from some remote location using Tapatalk...
 
Upvote 0
Back