simulastral Posted June 11, 2007 Share Posted June 11, 2007 Turns out the search works every time if you use the submit button to submit, but not if you hit the enter key. Who would have thunk it? Is there a solution to this problem so that the enter key works everytime? A snippet of my previously posted code: if (isset($_POST['search'])) { include('db_connect.php'); include('sec_script.php'); $product = escape_data($_POST['product']); $query = "SELECT id, productname, other, address FROM products WHERE MATCH (productname) AGAINST ('$product') ORDER BY productname"; $result = @mysql_query ($query); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){ AND THE FORM: <p style="margin-bottom:0px;">Product Search: </p><form action="search.php" method="post"><input name="product" type="text" /> <input type="submit" name="submit" value="search" /></form> Quote Link to comment https://forums.phpfreaks.com/topic/55171-ie7-madness/ Share on other sites More sharing options...
pocobueno1388 Posted June 11, 2007 Share Posted June 11, 2007 Your input buttons name is "submit", so I'm not sure why are are calling it "search". Try changing this line: if (isset($_POST['search'])) To: if (isset($_POST['submit'])) Quote Link to comment https://forums.phpfreaks.com/topic/55171-ie7-madness/#findComment-272709 Share on other sites More sharing options...
ToonMariner Posted June 11, 2007 Share Posted June 11, 2007 you could use javascript BUT users will soon learn that the submit button has to be hit so I would not bother putting in extra work that is unneccessary and may play up when you are in a textarea.... just live with it - it doesn't hurt. Quote Link to comment https://forums.phpfreaks.com/topic/55171-ie7-madness/#findComment-272728 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.