Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
$10
Custom search form - how do I get the posted values?
This is how the form looks like:
<form class="search" method="GET" action="search-results">
<input type="hidden" name="rooms_from_value" class="rooms_from_value" value="" /
<input type="hidden" name="rooms_to_value" class="rooms_to_value" value="" />
<input type="hidden" name="space_from_value" class="space_from_value" value="" />
<input type="hidden" name="space_to_value" class="space_to_value" value="" />
<input type="hidden" name="price_from_value" class="price_from_value" value="" />
<input type="hidden" name="price_to_value" class="price_to_value" value="" />
<input type="hidden" name="country" class="display country" value="" />
<input type="hidden" name="type" class="display type" value="" />
<button type="submit">Search</button>
</form>
Why all the hidden fields? I've created non-form input elements to enhance the look and feel of the form. These elements then provide the hidden fields with the appropriate values when selected.
As for the action I want to take the user to a page called "search-results" and display the results there.
I'm pretty sure I know how to sort the results, I just can't fetch the values on the search-results site, I guess it's due to a conflict with the url rewrites. Any ideas?
Using WordPress 3.0 and the following plug-ins: WPML, Simple Fields
SOLVED
This question has been answered.
Staffan Estberg | 08/01/10 at 6:22am
Edit
(1) Possible Answers Submitted...
See a chronological view of answers?
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
-

Last edited:
08/05/10
9:37amLew Ayotte says:I may not be understanding your question...
When you submit the form you can use the $_GET['variable'] (where variable is the name of the input field) to get the values you want.
So for rooms_from_value, you'd use $_GET['rooms_from_value'];
Is that what you're asking?
Lew- 08/01/10 3:02pm
Staffan Estberg says:Never mind, solved it.
- 08/01/10 3:02pm
This question has expired.
Current status of this question: Completed
Warning: Please do not give out any FTP or ssh credentials to anyone, unless you trust them completely. Giving out login details is dangerous.
If the asker does not get an answer then they have 10 days to request a refund.
