'// Begin pForm.asp
<html>
<body>
<form method="post" action="pForm.asp">
From Period : <input type="text" name="FromPeriod"><br>
To Period : <input type="text" name="ToPeriod">
<input type="submit" value="Submit" action = "Go">
</form>
<%
'// Check the first field only (assumes it is required)
If Request.Form("FromPeriod") <> "" Then
Response.Write "From: " & Request.Form("FromPeriod") & "<br>"
Response.Write "To: " & Request.Form("ToPeriod")
End If
%>
</body>
</html>
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
<> wrote in message
news: oups.com...
> I have a simple form to accept two form fields and display the values
> entered on pressing the submit button. The following is the form I have
> created to accept the two entries and display the form fields on
> pressing the submit form. It does not work can somebody please correct
> the code or provide a simple equivalent code where I can have the form
> and the validation and usage of the form values in the same ASP page.
>
> Thanks
> Karen
>
> <html>
> <body>
> <form method="post">
> >From Period : <input type="text" name="FromPeriod">
> <br>
> To Period : <input type="text" name="ToPeriod">
> <input type="submit" value="Submit" action = "Go">
> </form>
>
> <%
> Dim FromVal, ToVal
> FromVal = Request.Form("FromPeriod")
> ToVal = Request.Form("ToPeriod")
> Response.Write FromVal
> Response.Write ToVal
>
>
> If FromVal & ToVal <> ""
> Then
> Response.Write "Valid data entered"
> End If
> %>
> </body>
> </html>
>