Search code examples
phpmysqldreamweaversearch-box

PHP Search box and displaying record


I have a search box that should look for a record that matches what was searched(transaction_num) I followed the steps here dreamweaver help but when I click the search button in the search page, it doesn't do anything. It doesn't jump to the results page.

Search page

<form action="searchRESULT.php" method="get">
  <input name="search" type="text" id="search" />
  <input name="search" type="button" id="search" value="Search" />
</form>

Result page contains the dynamic table. code generated by dreamweaver.(I use DW cs6) The filter in the recordset is set to transaction_num = URL parameter then 'search' which is the name of the search textfield in the search page.

Nothing happens when I click the search button. You can link me some tutorials or examples.


Solution

  • Your Search button needs to be of the type "submit", so

    <input name="search" type="submit" id="search" value="Search" />