0

错误第 289 行,第 13 列:未打开的元素“选择”的结束标记

</select> &nbsp; &nbsp; &nbsp; <input type="image"  src="http://ncrads.com/…

这是我的代码..我已正确关闭选择:( :(

<select   name="category" id="category" style="font-family: verdana;font-size: 11px; border: 1px solid rgb(102, 102, 102);width:120px;">**
    <option value="ALL">---All Category ---</option>
        <?php
            $sql1= 'SELECT cd.categories_name, cd.categories_id, c.category_id, c.parent_id FROM categories c, categories_description cd WHERE cd.categories_id = c.category_id AND c.parent_id = 0';
            $res1= q($sql1);
            $space ='&nbsp;&nbsp;&nbsp;';
            if($res1){
                while($row1 = f($res1)){
                if($row1['categories_id'] == $_SESSION['categorys']){
                    echo "<option value=\"".$row1['categories_id']."\" selected>".$row1['categories_name']."</option>";
                    }
                    else{
                    echo "<option value=\"".$row1['categories_id']."\">".$row1['categories_name']."</option>";
                    }
                }
            }
        ?>
</select> &nbsp; &nbsp; &nbsp; <input type="image"  src="http://ncrads.com/images/search.jpg" name="submit" value="submit"  align="top"/>
4

1 回答 1

-1

尝试 selected=\"selected\" 而不是 doctype xhtml 中不允许的单个选择。

于 2012-11-19T07:02:09.727 回答