View Single Post
Old February 4th, 2005, 07:07 AM
ismnanie ismnanie is offline
Registered User
Join Date: Jan 2005
Location: klang, selangor, Malaysia.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ismnanie Send a message via Yahoo to ismnanie

Thank you, snib. although you didnt give any answer, but i really appreciate your idea. i've tested the functions by using textfields, there's no output at all on b.php. then, i tried again by try-and-error. At last, i've found the solution.

<input name="Submit" type="submit" value="Submit"
  class="formbutton" onClick="date1.value=X(),

<input name="reset" type="reset" value="Reset"

<input type="hidden" name="date1">
<input type="hidden" name="date2">

<script language="JavaScript">
function X()
      with (document.forms['form1']) { return DropReadYMD(YrSel,
      MoSel, DySel) }

function Y()
       with (document.forms['form1']) { return DropReadYMDn(Yrs,
       Mos, Dys) }


$dt1 = $_POST["date1"];
$dt2 = $_POST["date2"];
$query="SELECT * FROM tbl1 Date BETWEEN '%$dt1' AND
             '%$dt2' ORDER BY Date";

i posted this solution so that it will help anyone who has a problem same like me^__^