MyBB Community Forums

Full Version: php if statements
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Replace $fid with $GLOBALS['fid'] and see if it works. Smile
<if $fid == 19 then><a href="forms.php?id=1"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>

 <elseif $fid == 20 then><a href="forms.php?id=2"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>

 <elseif $fid == 22 then><a href="forms.php?id=3"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>

 <elseif $fid == 23 then><a href="forms.php?id=4"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>

 <elseif $fid == 28 then><a href="forms.php?id=5"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>

 <else />

 <a href="newthread.php?fid={$fid}"><img src="{$theme['imglangdir']}/newthread.gif" alt="{$lang->post_thread}" title="{$lang->post_thread}" /></a>

 </if>
Pages: 1 2