|
|
|
อยากได้โค้ด list menu ค้นหาตามวันที่ อยากได้โค้ด list menu ค้นหาตามวันที่ |
|
|
|
|
|
|
|
search ไม่ได้มี listmenu หลายอันไม่รู้ทำยังงัย
Code (PHP)
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-874" />
<title>Untitled Document</title>
<style type="text/css">
<!--
.style7 {font-family: Arial, Helvetica, sans-serif; font-size: 9pt; font-weight: bold; }
-->
</style>
</head>
<body>
<form id="form4" name="form4" method="post" action="search.asp">
<p>
<%
Dim Conn, ref1, ref2, ref3, ref4, ref5, ref6, ref7
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("mydatabase.mdb"),"" , ""
%>
</p>
<table width="212" height="128" border="0" cellpadding="0" cellspacing="0">
<tr>
<td><span class="style7">ประเภทการจัดหา :</span></td>
</tr>
<tr>
<td><span class="style7">
<select name="c1" id="c1" >
<option value=''>เลือกประเภทการจัดหา</option>
<%
set ref1=server.CreateObject("ADODB.RECORDSET")
ref1.Open "select CategoryName from category order by CategoryID",Conn
do while not ref1.EOF
%>
<option value='<%=ref1("CategoryName")%>'><%=ref1("CategoryName")%></option>
<%
ref1.MoveNext
loop
ref1.Close
set ref1=nothing
%>
</select>
</select>
</span></td>
</tr>
<tr>
<td><span class="style7">จากวันที่ :</span></td>
</tr>
<tr>
<td><span class="style7">
<select name="d1" id="d1">
<option value=''>วัน</option>
<%
set ref2=server.CreateObject("ADODB.RECORDSET")
ref2.Open "select dayName from day order by dayID",Conn
do while not ref2.EOF
%>
<option value='<%=ref2("dayName")%>'><%=ref2("dayName")%></option>
<%
ref2.MoveNext
loop
ref2.Close
set ref2=nothing
%>
</select>
<select name="m1" id="m1">
<option value=''>เดือน</option>
<%
set ref3=server.CreateObject("ADODB.RECORDSET")
ref3.Open "select monthName from month order by monthID",Conn
do while not ref3.EOF
%>
<option value='<%=ref3("monthName")%>'><%=ref3("monthName")%></option>
<%
ref3.MoveNext
loop
ref3.Close
set ref3=nothing
%>
</select>
<select name="y1" id="y1">
<option value=''>ปี</option>
<%
set ref4=server.CreateObject("ADODB.RECORDSET")
ref4.Open "select yearName from year order by yearID",Conn
do while not ref4.EOF
%>
<option value='<%=ref4("yearName")%>'><%=ref4("yearName")%></option>
<%
ref4.MoveNext
loop
ref4.Close
set ref4=nothing
%>
</select>
</span></td>
</tr>
<tr>
<td><span class="style7">ถึงวันที่ :</span></td>
</tr>
<tr>
<td><span class="style7">
<select name="d2" id="d2">
<option value=''>วัน</option>
<%
set ref5=server.CreateObject("ADODB.RECORDSET")
ref5.Open "select dayName from day order by dayID",Conn
do while not ref5.EOF
%>
<option value='<%=ref5("dayName")%>'><%=ref5("dayName")%></option>
<%
ref5.MoveNext
loop
ref5.Close
set ref5=nothing
%>
</select>
<select name="m2" id="m2">
<option value=''>เดือน</option>
<%
set ref6=server.CreateObject("ADODB.RECORDSET")
ref6.Open "select monthName from month order by monthID",Conn
do while not ref6.EOF
%>
<option value='<%=ref6("monthName")%>'><%=ref6("monthName")%></option>
<%
ref6.MoveNext
loop
ref6.Close
set ref6=nothing
%>
</select>
<select name="y2" id="y2">
<option value=''>ปี</option>
<%
set ref7=server.CreateObject("ADODB.RECORDSET")
ref7.Open "select yearName from year order by yearID",Conn
do while not ref7.EOF
%>
<option value='<%=ref7("yearName")%>'><%=ref7("yearName")%></option>
<%
ref7.MoveNext
loop
ref7.Close
set ref7=nothing
%>
</select>
</span></td>
</tr>
<tr>
<td><input type="submit" name="b" id="button" value="ค้นหา" /></td>
</tr>
</table>
<p> </p>
</form>
</body>
</html>
|
|
|
|
|
Date :
2009-09-16 23:43:46 |
By :
pattern |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ช่วยหน่อยนะค่ะ
|
|
|
|
|
Date :
2009-09-16 23:47:05 |
By :
pattern |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ให้ช่วยอะไรมั้ยครับ กึกๆๆๆ ปัญหาคืออะไรครับ
|
|
|
|
|
Date :
2009-09-18 22:09:58 |
By :
Joe_Dev |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ถ้าจะทำให้search แบบมี dropdown หลายๆอันทำยังงัย
|
|
|
|
|
Date :
2009-09-21 12:31:14 |
By :
pattern |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Date :
2009-10-12 14:07:43 |
By :
giroo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|