Need quick help with PHP math

Discussion in 'PHP' started by c0rrup, May 25, 2009.

  1. #1
    Hello I need some help with a tiny php math problem.

    I have

    Currently a user has to reffer 30 people to my site, and then it has a countdown on how many left to go.

    When they reach over 30, the "X more refferals to go" starts going negative.....

    Example:

    41 Refferals!

    -11 more refferals to go!

    Anyway to make it stop at 30 and stop going negatively? Thank you.
     
    c0rrup, May 25, 2009 IP
  2. felluahill

    felluahill Peon

    Messages:
    31
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <?php
    if (!($count >= 30))
    {
        // Put your code for saying how many referrals here //
    } else {
       // The person has 30 referrals //
    }
    ?>
    Code (markup):
     
    felluahill, May 25, 2009 IP
  3. c0rrup

    c0rrup Well-Known Member

    Messages:
    232
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #3
    I'm getting an error when I add my echo's into it.
     
    c0rrup, May 25, 2009 IP
  4. c0rrup

    c0rrup Well-Known Member

    Messages:
    232
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    105
    #4
    actually, thanks it helped me solve it

    got it working fine now :)

    Thank you felluahill
     
    c0rrup, May 25, 2009 IP