Re: [PHP4BETA] Search options
| From: | David Robley | Date: | Thu, 17 Feb 2000 00:03:10 +0000 |
| Subject: | Re: [PHP4BETA] Search options | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-10376@lists.php.net to get a copy of this message | ||
On 16 Feb, Absm wrote:
> Need assistance please;
> Require the html form to search mysql table for varing Nos of days.
> When this is typed manually to Mysql the Results for past 7 days appear:
> current_date - period < 00000008
>
> Whats required is to get this query from html to mysql via php.
>
> Any corrections offered for the php script???
>
> much appreciated
>
> abbs1@x-stream.co.uk
>
>
>
>
>
> ****************************************************************************
> *
> Html Form:
> Search For :
> <select name="past_ads">
> <option value = 0>UnSelected
> <option value> Past 7 Days
> <option value> Past 14 Days
> <option value> Past 21 Days
> <option value> All Ads
> </SELECT>
You really need to assign some values to the various options for
past_ads, so you can use them directly in your query; for example
<select name="past_ads">
<option value = 0>UnSelected
<option value=7> Past 7 Days
<option value=14> Past 14 Days
<option value=21> Past 21 Days
<option value=9999> All Ads
</SELECT>
How you then implement that is left as an exercise for the reader :-)
Cheers
--
David Robley | WEBMASTER & Mail List Admin
RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/
AusEinet | http://auseinet.flinders.edu.au/
Flinders University, ADELAIDE, SOUTH AUSTRALIA