Some more ASP

Discussion in 'Software' started by NeoNemesis, Dec 1, 2004.

  1. NeoNemesis

    NeoNemesis Moutharrhea

    Im trying to make a login page for somone and I can't figure something out. I"m using a MySQL database for the usernames and password and I can't figure out what I would need to do to make it check for the password for a certain username. Like without making a new column for each username. This way when say I have a user called "Neo" and his password is "Neo", how would I have it so that when I enter Neo in the username, it will check for that users password to make sure it is right in the database. So that way the username, and password have to be correct. Not just the password.
     
  2. Kodo

    Kodo SNATCHSQUATCH

    Username=replace(request.form("username"),"'","''")
    Password=replace(request.form("password"),"'","''")


    SQL="Select ID From USERSTABLE where USERNAME='"&username&"' and PASSWORD='"&password&"' "
    set rs=conn.execute(SQL)
    if not rs.eof then
    response.write ("user exists")
    else
    response.write("access denied")
    end if
     
  3. NeoNemesis

    NeoNemesis Moutharrhea

    Thanks Kodo, I'll give that one a try.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds