View Full Version : A bit of PHP help?
Johno
02-08-2008, 04:37 PM
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!
Calon
02-08-2008, 04:38 PM
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'
Johno
02-08-2008, 04:48 PM
$onlinedj is defined by the current servertitle of the ShoutCast, forgot to mention that!
Source
02-08-2008, 04:51 PM
Sorry your post is really confusing? Mind explaining it again?
Calon
02-08-2008, 04:52 PM
$onlinedj is defined by the current servertitle of the ShoutCast, forgot to mention that!
$somecheck = mysql_query("SELECT * `userstore` WHERE `rank` = '4' AND username = '$logged[user]'");
if($onlinedj == $logged[user]) {
// whatnot
}
Something along them lines.
Johno
02-08-2008, 04:57 PM
I got it, I was looking for the || operator :P
Thanks anyway :)
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.