Forums

This topic is locked

Insert record question

Posted 05 Nov 2002 21:00:49
1
has voted
05 Nov 2002 21:00:49 Jelle-Jacob de Vries posted:
My form contains 2 input fields,

In the first field people have to enter the start date for a game or something else.

In the second field people can enter an end date for the game or something else.

People dont have to fill in the end, because in most cases a game is only for one day.

But, if the second date (the end date) is not filled in by the user, I want a script or the database to enter the same date in the end date, as in the start date. (in the database, not on the form)

Is this possible ?

Replies

Replied 08 Nov 2002 10:50:52
08 Nov 2002 10:50:52 David Behan replied:
Simple really...

<%
form_date_1 = Request.Form("start_date"
form_date_2 = Request.Form("end_date"

IF form_date_2 = "" THEN form_date_2 = form_date_1 END IF

%>

_________________________
WinXP : IIS 5.1 : StudioMX : ASP : VBScript
www.clicksdesign.com

Reply to this topic