I'm using Win32:ODBC in conjunction with CGI for ActivePerl in Win2k server. I need to search an MS database for a username. If the username is not found, I'm going to display a "username not found" page. Once the username is found, I need to check the corresponding password, which is in the same row. (for now I'm not going to worry about encryption of passwords).
Once the username/password pair is verified, I need to set a cookie that will expire when the browser is closed.
I already know how to connect to a database and 'fetchrows' in a table. I also know how to do CGI. I tried to code this myself and I can't get it to work efficiently. With my test script, it keeps 'finding' any username that I search for even though it doesn't exist in the table. I don't want to include any code here because I think I'm way off.
Could someone provide me with a routine to do what I'm trying to do as far as verifying username/password from a database and then setting a cookie if verified?