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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Asp website help

Status
Not open for further replies.

dwa0456

Technical User
Oct 5, 2010
4
0
0
IN
I have a mysql database with database name 'details' and table name 'details'.In my table there is information like Sr no,name,age,mobile no.

I want to create an asp page with a textbox and a submit button.I want the user to type their Sr no. and when they submit get their details in a table format.How should i write the script.
 
This is an example of the database:
regid Name Surname Email id
1 Abc Dsouza something@something.com
2 Xyz fernamdas try@example.com
Here is the html form code:


<html>
<head>
<title>Demo</totle>
</head>
<body>
<p>Please enter your Registeration number to see your Details</p>
<form name="form1" action="result.asp">
<input type="text" name="regid">
<br>
<input type="submit" value="sumbit">
</form>
</body>
</html>



I have no idea how to start with the result.asp page
 
In broad terms:
Give your form a method of post.
On results.asp, look in the request.form collection to find the value of the variable you want.
Create a recordset object, set up a connection, and construct an SQL statement that will return the data you want.
Execute the statement.
Set up a loop.
Walk through the returned recordset and response.write it out into a table.

Work through this and you will beging to see the pieces:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top