Monday, December 17, 2007

How to use a form to post information to the webserver

How to use a form to post information to the webserver

S T E P - 1

- Firstly, we create a web form with ASP to get the information from the user:

'We post the form to the "form02.asp"

Your Name :
'Create a field to type in user name.

Your Email :
'Create a field to type in email.

'Submit Button

You will see the output. Please enter your name and email in the following fields, and click the "Submit Query" button.

S T E P - 2

- This is the output. We use the information of the form, and display it on the screen.

S T E P - 3

- This is the ASP codes in the form2.asp:

<%

Response.write("Hello, " & Request.Form("uName") & _

"
This is your email - " & Request.Form("EMail"))

%>

Request.Form("uName") stores the "user name" field of the form.

Request.Form("EMail") stores the "Email" field of the form.

No comments: