I've got a search form that users enter a stock code then click search and the results are displayed. My problem is a lot of users enter the stock code then hit "Enter" but with my checking (below) is doesn't think the search button has been clicked.
How can I capture "Enter" being pressed so I can perform the required search?
PHP Code:
//Check if form has been submitted
if (!isset($_POST['submit']) ) {
//display search form
}
Thanks kasracer. I have a textbox as the only item in the form (along with submit button) If I type a stock code then hit enter the page re-loads but shows the search page again instead of search results.
No idea why enter just doesn't work then. I take it you don't have some sort of page accessable to us, do you? Does it work correctly in any web browsers?
KrisSiegel.com - My Personal Website with my blog and portfolio Don't Forget to Rate Posts!