the following issue is in IE 7 & 8. Chrome, Firefox, and IE 9 have no trouble
I’ve been scouring the web for a solution to this problem and have found several instances where people have had issues. Unfortunately I’ve yet to find an adequate response.
I have a search form who’s input values are being posted to search.php.
home.php:
<form name="searchForm" id="searchForm" method="post" action="search.php">
<input type="text" name="searchInput" id="searchInput" value="" />
<input type="submit" name="searchBtn" id="searchBtn" value="Search" />
</form>
Search.php:
//Appears before HTML tag
if(isset($_POST['searchBtn'])){
$search = $_POST['searchInput'];
if(isset($search)){
$feedback = "Search query: " . $search;
}else{
$feedback = "Search is not set.";
}
}
<!-- Appears in document body -->
<div id="searchResult"><?php echo $feedback; ?></div>
SO, the problem is that when the user enter a search term and physicall clicks the search button with the mouse, everything works out perfectly.
HOWEVER, when the user enters a search term and just presses enter on the keyboard, the value doesn’t pass to search.php and $search does not get set.