Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date from online form to asp file

Status
Not open for further replies.

Rosee

IS-IT--Management
Dec 12, 2001
187
US
The code I am trying is for user to run report online. But I don't know how to pass the date value from the form to an asp file where has SQL query statement.

All user needs to do is to select the date and the month from a pulldown list, click OK, the report then will be displaying on the screen.

The SQL statement may looks similar to this:
select lastname, firstname, pin, phone enterdate
from people where enterdate between '&startdate' and '&enddate'

How to use the date and month that user entered online and make the report? any suggestions are appreciated.
Thanks
 
<form action=&quot;yourAsp.asp?Data=true&quot; method=&quot;Post&quot;>
start date:&nbsp;<select name=&quot;startDate&quot;>
<option value=&quot;1&quot;>1
<option value=&quot;2&quot;>2
...
<option value=&quot;31&quot;>31
</select>
&nbsp;&nbsp;
start month:&nbsp;<select name=&quot;startMonth&quot;>
<option value=&quot;Jan&quot;>Jan
<option value=&quot;Feb&quot;>Feb
...
<option value=&quot;Dec&quot;>Dec
</select>
<br>
end date:&nbsp;<select name=&quot;startDate&quot;>
<option value=&quot;1&quot;>1
<option value=&quot;2&quot;>2
...
<option value=&quot;31&quot;>31
</select>
&nbsp;&nbsp;
end month:&nbsp;<select name=&quot;startMonth&quot;>
<option value=&quot;Jan&quot;>Jan
<option value=&quot;Feb&quot;>Feb
...
<option value=&quot;Dec&quot;>Dec
</select>
<br>
<input type=&quot;submit&quot; value=&quot;run report&quot;>
<form>

now in asp you can say:

startDate = request.form(&quot;StartDate&quot;)
startMonth = request.form(&quot;StartMonth&quot;)
endDate = request.form(&quot;StartDate&quot;)
endMonth = request.form(&quot;StartMonth&quot;)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top