Help with searchform php
-
I am trying to make this work but it will not get the variable from the dropdown. I can manually add text to $search_text but not from the $_POST. Any help is REALLY appreciated.
The code:
<form method="post" id="searchform" action="<?php bloginfo('url'); ?>/"> <table width=100% border="0" align="center"> <tr> <td><label>Select Genre/Type of Game</label> <br /> <select name="genre"> <option value="Music"> - </option> <option value="Action" > Action </option> <option value="Adventure" > Adventure </option> <option value="Arcade" > Arcade </option> </select></td> </tr> </table> <?php $search_text = $_REQUEST["genre"]; ?> <input type="text" value="<?php echo $search_text; ?>" name="s" id="s" /> <input type="submit" id="searchsubmit" value="Search now" /> </form>
Thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Help with searchform php’ is closed to new replies.