Hello, Thanks fo help befor o "musicchart" but probably I´m not good enough to use the script he has send me. I would like to have on my page the possibility for the customers to insert the username and the PIN code and then see their prvat data from the My SQL database.I will put the data to the d-base myself so it doesn´t have to take any data from the customer only to read the exact row of the d -base - the one where he username and the PIN code is if they ae right... I would like to ask if there is anybody who could do this for me for the price which I could pay. Thank you very much
You need a form with two form fields for the users to input their informations. The form fields must be named: "ID" and "PW". Submit the data to a file containing below code:
Dim IDform, PWform IDform = request.form("ID") PWform = request.form("PW")
strSQL = "Select * from users" Set rs = Conn.Execute(strSQL)
IF NOT (rs.BOF or rs.EOF) then
'check the userID & PW against the database content Do IF IDform = rs("userid") and PWform = rs("pw") then
The code is comparing the user input against the colomn's "userID" & "pw" and if the user's information is found, the name from the colomn "name" is displayed. You can add your own db-colomn as you like.
There might be a better solution, but this should indeed work...
sql = "SELECT * from users where userID = '"& request.form("ID") &"' AND '"& request.form("PW") &"'" set record = conn.execute(sql)
if record.eof then Response.write "User not found" else Response.write "Hey " & record("name") & " .. welcome!" end if
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.