View Full Version : Help - I need to POST multi text fields !!!

03-16-2006, 07:05 PM
Hi guys.

Hope someone can help. I have a form page with 3 text fields in it, 1 for the year, one for month and one for the day. The format is:- textfield1 (yyyy) - textfield2(mm) - textfield3(dd). I have used javascript to input the system date into the 3 seperate fields, which is by the by really, but anywayzzz...

The problem i have is that when you click send, the next page will filter database results by the POST'ed date value, but how would I join the 3 seperate values into the 1 which the filter works by ('yyyy-mm-dd'), would/could I tell the recordset filter to look for all 3 values combined somehow, or could you do some kind of hidden field value on the form page whereby it's value will be yyyy-mm-dd.

If so, how would you do this??? :?

Cheers guys, thanks...

03-17-2006, 07:44 AM
I take it your using PHP

if so try this...

$d = $_POST['day'];
$m = $_POST['month'];
$y = $_POST['year'];

$dateconcat = $y.'-'.$m.'-'.$d;

now just use $dateconcat in your query

03-17-2006, 07:41 PM
Thanks mate, your a star...