I am new to wordpress, so if this question was already answered I apologize in advance.
I have a search form in wordpress which looks like this:
<form action="wordpress/action.php" id="search_form" method="get"> <label for="s" class="hidden"></label> <input type="text" size="30" id="s" name="s" value=""> <input type="submit" value="Search" id="searchsubmit"> </form>
The file action.php looks up a given string (in this case a name) in a database and returns an array of "similar" written names. After hitting the submit button I want the results to be proposed in a clickable proper list to the user. I thought of listing the items in the same widget. Here the structure I was thinking of.
SEARCH FIELD HERE | SUBMIT BUTTON HERE John Doe John Dö Johnny Doe etc.
Then the user can click the prefered name and information to this name will be shown in the main part of the page.
Is there something that already realizes that? Or do I have to write that on my own. In the second cas: What would be the best approach for that?
I was thinking about using sessions to store the result of a query of a user. Redirecting to the same page would let php read the list and print it to the widget. Would this be a usable approach? Well, I still need to know where to tell php to echo inside the text widget, though...