Dhagaxtuur
Technical User
I have the following listbox incrementing date by day. It's part of a form processed by another file. When I select value and try to update a field in a database, it saves selected value concatinating with previous value. For example if I had 1/2/2003 and try to update to 1/4/2003 result is 1/3/20031/4/2003. I know the problem is associated with the loop. [for day=0 to 90]. How can I save only selected option?.
<select name="shipdate">
<%
dim day, selectionDate
for day = 0 to 90
currDate =Dateadd("D",day,Date)
%>
<option value="<%=selectionDate%>"><%=selectionDate%>
<%next%>
</select>
<select name="shipdate">
<%
dim day, selectionDate
for day = 0 to 90
currDate =Dateadd("D",day,Date)
%>
<option value="<%=selectionDate%>"><%=selectionDate%>
<%next%>
</select>