Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Location
    Scotland
    Posts
    2,087
    Tokens
    138

    Latest Awards:

    Default A bit of PHP help?

    Hey,

    Im actually sitting trying to do some PHP, but I can't see how to do something.

    If I have a variable ($onlinedj) and it is only defined to one person, how can I do something like an or thing?

    Like if $logged[user] == $onlinedj OR $logged[rank]>4?

    Sorry, I haven't explained it very well!

  2. #2
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Johno! View Post
    Hey,

    Im actually sitting trying to do some PHP, but I can't see how to do something.

    If I have a variable ($onlinedj) and it is only defined to one person, how can I do something like an or thing?

    Like if $logged[user] == $onlinedj OR $logged[rank]>4?

    Sorry, I haven't explained it very well!
    Change the query of onlinedj too

    SELECT `userstore` WHERE `rank` = '4'

  3. #3
    Join Date
    Feb 2006
    Location
    Scotland
    Posts
    2,087
    Tokens
    138

    Latest Awards:

    Default

    $onlinedj is defined by the current servertitle of the ShoutCast, forgot to mention that!

  4. #4
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Sorry your post is really confusing? Mind explaining it again?


    www.fragme.co = a project.

  5. #5
    Join Date
    Jul 2008
    Location
    Hastings, UK.
    Posts
    2,050
    Tokens
    0

    Latest Awards:

    Default

    Quote Originally Posted by Johno! View Post
    $onlinedj is defined by the current servertitle of the ShoutCast, forgot to mention that!
    PHP Code:
    $somecheck mysql_query("SELECT * `userstore` WHERE `rank` = '4' AND username = '$logged[user]'");

    if(
    $onlinedj == $logged[user]) { 
    // whatnot

    Something along them lines.

  6. #6
    Join Date
    Feb 2006
    Location
    Scotland
    Posts
    2,087
    Tokens
    138

    Latest Awards:

    Default

    I got it, I was looking for the || operator

    Thanks anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •