Create a Dropdown List

Results 1 to 2 of 2

Thread: Create a Dropdown List

  1. #1
    Join Date
    Dec 1969

    Default Create a Dropdown List

    I have a Login Page, If a User "A" enters his userid and password he will go to another page where he will select his Page Name(Test.asp) from the Dropdown List to go further. In my Table i have UserId,Password, DataType fileds. Based on the DataType i need to create the Dropdown List (for User "A" - Test.asp for User "B" Support.asp like this). Pls help me in this.

  2. #2
    Join Date
    Dec 1969

    Default What does your DB look like?

    I would *HOPE* that you have three separate tables:<BR><BR>UsersTable<BR> userID : autonum, perhaps?<BR> uName : text<BR> pwd : text<BR><BR>PagesTable<BR> pageID : autonum<BR> pageName : text<BR><BR>UserPages<BR> userID : foreign key to UsersTable<BR> pageID : foreign key to PagesTable<BR><BR>**************<BR><BR>If you have all that, it&#039;s easy:<BR><BR>SELECT pagesTable.pageName<BR>FROM pagesTable, userPages, usersTable<BR>WHERE pagesTable.pageID = userPages.pageID<BR>AND userPages.userID = usersTable.userID<BR>AND usersTable.uName = &#039; from form...&#039;<BR>AND usersTable.pwd = &#039;...password form form...&#039;<BR>ORDER BY pagesTable.pageName<BR><BR>And if you don&#039;t get any records from the (if you get RS.EOF right away), then one of three things have happened:<BR>(1) The username from the form is bad<BR>(2) The password form the form is bad<BR>(3) There are no pages assigned to this user, yet, in the UserPages table.<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts