PHP if… else Help Required
In my template I want to specify that one of my forums can be posted to by admins only, and other users can only reply.
I figured the best way (and I know it’s not foolproof, but at least I can make it more difficult for people to do!) would be to use an if… else statement, but I’m not sure how to correctly write it.
In non-PHP structure: “if the forum ID is 2 and the user is an admin, show the ‘add topic’ link; and if the forum is not equal to 2 then show the link to all registered members (in other words, let them see the ‘add topic’ link in every other forum except 2) “.
If you could please assist a php-noob by showing me the correct structure for this statement, it’d be much appreciated.
Also, if you know of a better way to make one forum admin-post only and member-reply only (while the others forums remain as they are now), I’m all ears! Well, all eyes since I’ll be reading rather than listening.
Thank you so much in advance!
You must be logged in to reply to this topic.