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
Default

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.

-----
a.php
<input name="Submit" type="submit" value="Submit"
  class="formbutton" onClick="date1.value=X(),
  date2.value=Y();">

<input name="reset" type="reset" value="Reset"
  class="formbutton">
<br>

<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) }
}
</script>

----
b.php

$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^__^

http://wp.netscape.com/eng/mozilla/3...ok/javascript/