anon Posted May 24, 2007 Share Posted May 24, 2007 Can anyone give me the code for a simple 'Search' button, which has an action tied to it. Such as a PHP action. ??? ??? Quote Link to comment Share on other sites More sharing options...
Lumio Posted May 24, 2007 Share Posted May 24, 2007 <?php if (isset($_POST['search_sent'])) { print_r($_POST); } ?><form name="search_form" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="POST"> <input type="text" name="search" value="" /><input type="submit" name="go" value="Search" /> <input type="hidden" name="search_sent" value="1" /> </form> Quote Link to comment Share on other sites More sharing options...
anon Posted May 24, 2007 Author Share Posted May 24, 2007 <?php if (isset($_POST['search_sent'])) { print_r($_POST); } ?><form name="search_form" action="<?= htmlspecialchars($_SERVER['PHP_SELF']) ?>" method="POST"> <input type="text" name="search" value="" /><input type="submit" name="go" value="Search" /> <input type="hidden" name="search_sent" value="1" /> </form> THANKS ALOT, but how would i get the search box to be bigger? Quote Link to comment Share on other sites More sharing options...
craygo Posted May 24, 2007 Share Posted May 24, 2007 add the size to the input <input type="text" name="search" size=50 value="" /> Ray Quote Link to comment Share on other sites More sharing options...
anon Posted May 24, 2007 Author Share Posted May 24, 2007 add the size to the input <input type="text" name="search" size=50 value="" /> Ray <Thank you, will try/> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.