Help with non functioning IF statement
Posted: Fri May 07, 2010 10:18 am
Ok, so I am just playing around a little bit trying to learn PHP & MySQL and I am trying to create a very small forums, now the bulk of the forum code is run from IF statements in the index.php file. Now I have these two IF statements
now when the page is first viewed it shows the different forums, which it is supposed to do, however when you click the link for one of the forums and the url reads index.php?fid=1&act=0 it is still executing the code inside the first IF statement instead of the second one, I don't understand why it is not behaving the way it is intended to, any help would be appreciated.
Code: Select all
if ($fid == ''){
//show the different forums
} elseif ($fid != '' && act =='0'){
//show the posts in the selected forum
}