I'd like to determine the selected option in a select list based on a
passed variable.  The code below won't work, but I can't figure out why.
 Any guesses?

                echo "<form>";
        echo "<select name=\"display\">";
        echo "<option value=\"true\"";
        if ($display==false){echo "selected";}
        echo ">Display";
        echo "<option value=\"false\"";
        if ($display==false){echo "selected";}
        echo "selected>Don't Display";
        echo "</select>";
        echo "</form>";


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to