Home » questions » How can i display table's fields element from the database on to the asp page? table has Usrname,pwd

How can i display table's fields element from the database on to the asp page? table has Usrname,pwd

2006-08-04 21:18:57, Category: Programming & Design
Now the senario is I have a table where in I have three fields: username,password and location. when i login using the asp page i need to go to another page called afterlogin.asp and in the afterlogin.asp page i need to display the username as "Welcome Username!!!!" and the Location "Your Location is: locationname" dear friends help me with this. the coding has to be done in classic asp and not asp.net.

Answers

  1. Kryzchek

    On 2006-08-04 23:48:30


    1. Create a Recordset object 2. Build an SQL string to query your database, such as "SELECT Username, Location FROM Users WHERE UserID = " & UserID 3. Open and populate your recordset. 4. Simply Response.Write your result to the screen: Response.Write objRS("Username")