Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Small php problem.

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35431
    SycoLV
    Member

    Hi Guys!
    I have a litle problem width my php code:

    
    if ($_GET == 'frontpage' || 'partners') {
    ?>

    }
    ?>

    So the code have to insert div if you go to yourname.com/index and yourname.com/partners but it shows the div all the time. Maybe someone can find a mistake in the code? Thanks!

    #91743
    Johann
    Member

    replace

    if ($_GET == 'frontpage' || 'partners') {

    with

    if ($_GET == 'frontpage' || $_GET == 'partners') {

    you know, ‘partners’ by itself always evaluates to true :P

    #91744
    SycoLV
    Member

    Thanks Johann!

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.