Problem with CSS Dropdown menu

Discussion in 'PHP' started by GSto, Nov 30, 2007.

  1. #1
    I am trying to make a drop down menu on a website that will show off various style sheets. when you pick one from the menu, I want the site to reload using the selected stylesheet, but I cannot seem to get this to work. what am I doing wrong?

    In the head:

    <head>
    <?php
    if ($_Get["style"] == "Red") {
    echo '<link rel="stylesheet" href="CodeRed.css" type="text/css" media="screen">' ;
    }
    else if ($_Get["style"] == "Blue") {
    echo '<link rel="stylesheet" href="CodeBlue.css" type="text/css" media="screen">' ;
    }
    else {
    echo '<link rel="stylesheet" href="CodeBlue.css" type="text/css" media="screen">' ;
    }
    ?>
    </head>

    And the selector Code:

    <form action="design.php" method="get">
    <select name="style">
    <option value="Red">Code Red</option>
    <option value="Blue">Code Blue</option>
    </select>
    <Input type ="Submit" value="View Style"></input>
    </form>


    Why isn't this working properly?
     
    GSto, Nov 30, 2007 IP
  2. GSto

    GSto Peon

    Messages:
    218
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    nevermind, I just figured it out. I was typing $_Get instead of $_GET
     
    GSto, Nov 30, 2007 IP