007
05-22-2003, 07:38 AM
I am trying to make an if/else statement that deals with the last reply time of threads. I had this working a few hours ago but I've since had to restart by PC when it froze and now I can't figure out what I did to begin with :(
Here's my basic idea of what I am trying to do:
if ((time()-$thread['lastpost']) >= 86400 and !$bbuserinfo['userid'])
{$variable=1;}
else if ($bbuserid != 0)
{$variable=2;}
if ((time()-$thread['lastpost']) >= 86400)
{
$variable=1;
}
elseif (!$bbuserinfo['userid'])
{
$variable=2;
}
elseif ($bbuserinfo['userid'] != 0)
{
$variable=3;
}
else
{$variable=4;
}
Is there something I don't understand about if/else statements??? This is basically what I am trying to do but i haven't been able to get this to work.
Is there a good place that shows the do's and don'ts of if/else statements???? Or can someone show me what I am doing wrong?
Thanks! :)
Here's my basic idea of what I am trying to do:
if ((time()-$thread['lastpost']) >= 86400 and !$bbuserinfo['userid'])
{$variable=1;}
else if ($bbuserid != 0)
{$variable=2;}
if ((time()-$thread['lastpost']) >= 86400)
{
$variable=1;
}
elseif (!$bbuserinfo['userid'])
{
$variable=2;
}
elseif ($bbuserinfo['userid'] != 0)
{
$variable=3;
}
else
{$variable=4;
}
Is there something I don't understand about if/else statements??? This is basically what I am trying to do but i haven't been able to get this to work.
Is there a good place that shows the do's and don'ts of if/else statements???? Or can someone show me what I am doing wrong?
Thanks! :)