[PHP] Problem with Subscription PHP? [UberCMS]

Results 1 to 9 of 9
  1. #1
    Ask me about Daoism FullmetalPride is offline
    Grand MasterRank
    Nov 2010 Join Date
    2,172Posts

    [PHP] Problem with Subscription PHP? [UberCMS]

    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 Code:
    <?php }} ?>

    <?php if($users->GetFriendCount(USER_IDtrue) != "0"){ ?>
    <li id="feed-friends">
    <strong><?php echo $users->GetFriendCount(USER_IDtrue); ?></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


  2. #2
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    Grand MasterRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    Re: [PHP] Problem with Subscription PHP? [UberCMS]

    try..
    PHP Code:
    $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 by leenster; 03-12-12 at 01:18 PM.

  3. #3
    Ask me about Daoism FullmetalPride is offline
    Grand MasterRank
    Nov 2010 Join Date
    2,172Posts

    Re: [PHP] Problem with Subscription PHP? [UberCMS]

    Quote Originally Posted by leenster View Post
    try..
    PHP Code:
    $subresult mysql_query("SELECT ts_exp FROM vip_subs WHERE user_id = '".USER_ID."'");
    $result mysql_fetch_array($subresult);
     
     if (
    $result["ts_exp"]..... 
    Thanks for replying. :) Gonna test.

    EDIT:

    No result. No error, though. Checked logs too.
    Last edited by FullmetalPride; 03-12-12 at 02:47 PM.

  4. #4
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    Grand MasterRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    [PHP] Problem with Subscription PHP? [UberCMS]

    Strange it worked fine when I tested it last night.

    Sent from some remote location using Tapatalk...

  5. #5
    Ask me about Daoism FullmetalPride is offline
    Grand MasterRank
    Nov 2010 Join Date
    2,172Posts

    Re: [PHP] Problem with Subscription PHP? [UberCMS]

    Quote Originally Posted by leenster View Post
    Strange it worked fine when I tested it last night.

    Sent from some remote location using Tapatalk...
    Hmm. :S Maybe I'll just simply enforce a VIP check.

    So this can stand alone? :P

  6. #6
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    Grand MasterRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    [PHP] Problem with Subscription PHP? [UberCMS]

    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...

  7. #7
    Ask me about Daoism FullmetalPride is offline
    Grand MasterRank
    Nov 2010 Join Date
    2,172Posts

    [PHP] Problem with Subscription PHP? [UberCMS]

    Don't worry; it all works. I'm changing it to username instead later to avoid IPN complications.

    I'm also going to release this as a 'PayPal IPN - Subscriptions System' soon :)

  8. #8
    Grand Master Masius is offline
    Grand MasterRank
    Dec 2007 Join Date
    1,580Posts

    Re: [PHP] Problem with Subscription PHP? [UberCMS]

    PHP Code:
    $delsub mysql_query("DELETE FROM vip_subs WHERE user_id = '".USER_ID."'"); 

  9. #9
    [̲̅$̲̅(̲̅1̲̅)̲̅$ ̲̅] leenster is offline
    Grand MasterRank
    May 2008 Join Date
    KanaadaLocation
    992Posts

    Re: [PHP] Problem with Subscription PHP? [UberCMS]

    Quote Originally Posted by Masius View Post
    PHP Code:
    $delsub mysql_query("DELETE FROM vip_subs WHERE user_id = '".USER_ID."'"); 
    Ah yes, I also deleted the * when i tested, lmao.....



Advertisement