Forum Moderators: coopster

Message Too Old, No Replies

Please i need to know this

am finding it had fixing this code

         

professorsunday

8:50 am on Sep 18, 2009 (gmt 0)

10+ Year Member



hello, i got this default code:Code:
<? } 
if($user_id=="13" ¦¦ $user_id=="5"){
?>

and i want to make it it a way that all users would be include, that is user id 1-1000. how do i modify the code becuase the modification i did gave me erro. thanks.Please i really need to know this quick

coopster

2:32 pm on Sep 18, 2009 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com], professorsunday.

First, you should get in the habit of using full php declarations. Second, if you want to include all users between 1 and 1000 you merely change your conditional expression and logical operator:

<?php 
if ($user >= 0 && $user <= 1000 {
// user is between 0 and 1000, inclusive
}
?>

professorsunday

2:31 pm on Sep 22, 2009 (gmt 0)

10+ Year Member



Thanks, it worked