SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Help with multiple Databases and ASP

    I am working on a site and I need some help. I need script or a link to a tutorial that will allow me to do the following.

    User enters username and password
    site checks the username and password against database1
    if the user entered the correct username and password the page shows records from database2
    if the user enterend incorrect username or password then nothing happens.

    I am new to this forum and really looking forward to being involved in the community.

    Thanks

  2. #2
    SitePoint Addict sinapra's Avatar
    Join Date
    Sep 2004
    Location
    secunderabad
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    quite simple, you can use two connections for your db's. and write two queries,
    Conn1 = connection with db1
    Conn2 = connection with db2
    1. select uname,pwd from db1.tb1 where uname ='$uname' and pwd='$pwd'
    if condition then
    2. select a,b,c from db2.tb2 where......
    result.......
    else
    do nothing or whatever
    end if

    Hope that helps
    Regards

    Its Great to work and Be Merry!!!!!!!!

  3. #3
    SitePoint Member
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for answering, but i need a little bit more specific.

    I am new to this whole asp thing. Like what are the connection things and could you be a little more descriptive on the script please.

    Thanks a ton.

  4. #4
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi
    Looks like to me, you need a tutorial in ASP

    I am not sure where to start, so i dont know where exactly you need help. e.g. how much about database you do know or if its access or MS SQL ?

    But basically ASP provides scripting interface to objects. When i say objects, it could be a backend database etc

    I recommend wrox publications, thats how i got started. Or any good book

    With the .asp web page extension, your webserver reads thru the script and allows you to execute whatever is in the <% %> tags you insert.

    e.g. <%=date%> woudl read the date on the server and print it on the asp page.

    Connection strings are just an interface to your database. You could choose to use them or ODBC, if you do know about them.

    Once you have a connection to your db, you could create recordsets to retrieve values from your database or authenticate from them, as the above (Sinapra)


    But i advice, you get tutorial or books on
    1. Database
    2. Scripting e.g. VB script or Jscript, vb script is simpler http://www.w3schools.com/asp/default.asp
    3. Connections, e.g. ODBC or connection strings http://www.connectionstrings.com/

    hope this helps

    Enjoy

  5. #5
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i would also advice you start of with a simple editor such as frontpage or dreamweaver, the later being much more powerful and you could read thru the scripts to get a hang of what you are doing

    Dreamweaver, application panel lets u set up either a DSN or connection string and also lets u log in a users.

    hope this helps

  6. #6
    Afrika
    Join Date
    Jul 2004
    Location
    Nigeria
    Posts
    1,737
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  7. #7
    SitePoint Addict sinapra's Avatar
    Join Date
    Sep 2004
    Location
    secunderabad
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    right afrika, i am sure your help provides the basic initiatives. [let us know if we can provide any further helps].
    Regards

    Its Great to work and Be Merry!!!!!!!!


Bookmarks

Posting Permissions

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