<% ' Get Login Information useremail = TRIM( Request.Form( "useremail" ) ) password = TRIM( Request.Form( "password" ) ) ' Open Database Connection Set Con = Server.CreateObject( "ADODB.Connection" ) Con.Open "accessDSN" ' Get User ID userID = checkpassword(useremail, password, Con) Response.Write "userID = " Response.Write userID Response.End %> There is still no value assigned to "checkpassword" "Ken Schaefer" wrote in message news:%phx.gbl...[ref] > Typo in my code: > > "SELECT user_id, user_password " > > should be > > "SELECT user_id, user_password " & _ > > Cheers > Ken > > "Ken Schaefer" wrote in message > news:phx.gbl...[ref] >> First thing to do is work out where you code is falling to. If you do not >> have a debugger, we can use Response.Write() statements. >> >> Also, removed the extraneous spaces between your values and your negative >> (-) symbols >> Lastly - don't forget to clean up your objects before exiting the routine >> >> Function checkpassword(byVal useremail, byVal password, byRef Con) >> >> Dim sqlString >> Dim objRS >> >> sqlString = _ >> "SELECT user_id, user_password " >> "FROM users " &_ >> "WHERE user_email='" & useremail & "'" >> >> Set objRS = Con.Execute( sqlString ) >> >> If objRS.EOF then >> >> checkpassword = -1 >> Response.Write("-1
") >> >> ElseIf objRS( "user_password" ) = "" then >> >> checkpassword = -2 >> Response.Write("-2
") >> >> ElseIf objRS("user_password" ) <> password then >> >> checkpassword = -3 >> Response.Write("-3
") >> >> ElseIf objRS( "user_password" ) = password then >> >> checkpassword = RS( "user_id" ) >> Response.Write("-4
") >> >> Else >> >> Response.Write("-5
") >> >> End If >> >> objRS.Close >> Set objRS = Nothing >> >> End Function >> >> >> Cheeers >> Ken >> >> wrote in message >> news:phx.gbl...[ref] >>> The code below does not assign any value to "checkpassword" no matter >>> what values are passed to the function. I have used Response.Write on >>> all the values including the "user" table values and all values are >>> valid. I have no clue what's wrong. Can someone provide some help? >>> >>> FUNCTION checkpassword( byVal useremail, byVal password, byRef Con ) >>> >>> sqlString = "SELECT user_id, user_email, user_password FROM users " &_ >>> >>> "WHERE user_email='" & useremail & "'" >>> >>> SET RS = Con.Execute( sqlString ) >>> >>> IF RS.EOF THEN >>> >>> checkpassword = - 1 >>> >>> ELSEIF RS( "user_password" ) = "" THEN >>> >>> checkpassword = - 2 >>> >>> ELSEIF RS( "user_password" ) <> password THEN >>> >>> checkpassword = - 3 >>> >>> ELSEIF RS( "user_password" ) = password THEN >>> >>> checkpassword = RS( "user_id" ) >>> >>> ELSE >>> >>> END IF >>> >>> END FUNCTION >>> >>>[/ref] >> >>[/ref] > >[/ref] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => <#U94whOsEHA.2316@TK2MSFTNGP12.phx.gbl> [htmlstate] => on_nl2br [postusername] => [ip] => westernnord@web [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 4 [attachments] => [allattachments] => ) --> > > <% > > ' Get Login Information > > useremail = TRIM( Request.Form( "useremail" ) ) > > password = TRIM( Request.Form( "password" ) ) > > ' Open Database Connection > > Set Con = Server.CreateObject( "ADODB.Connection" ) > > Con.Open "accessDSN" > > ' Get User ID > > userID = checkpassword(useremail, password, Con) > > Response.Write "userID = " > > Response.Write userID > > Response.End > > %> > > There is still no value assigned to "checkpassword" > > > > "Ken Schaefer" wrote in message > news:%phx.gbl...[ref] >> Typo in my code: >> >> "SELECT user_id, user_password " >> >> should be >> >> "SELECT user_id, user_password " & _ >> >> Cheers >> Ken >> >> "Ken Schaefer" wrote in message >> news:phx.gbl...[ref] >>> First thing to do is work out where you code is falling to. If you do >>> not have a debugger, we can use Response.Write() statements. >>> >>> Also, removed the extraneous spaces between your values and your >>> negative (-) symbols >>> Lastly - don't forget to clean up your objects before exiting the >>> routine >>> >>> Function checkpassword(byVal useremail, byVal password, byRef Con) >>> >>> Dim sqlString >>> Dim objRS >>> >>> sqlString = _ >>> "SELECT user_id, user_password " >>> "FROM users " &_ >>> "WHERE user_email='" & useremail & "'" >>> >>> Set objRS = Con.Execute( sqlString ) >>> >>> If objRS.EOF then >>> >>> checkpassword = -1 >>> Response.Write("-1
") >>> >>> ElseIf objRS( "user_password" ) = "" then >>> >>> checkpassword = -2 >>> Response.Write("-2
") >>> >>> ElseIf objRS("user_password" ) <> password then >>> >>> checkpassword = -3 >>> Response.Write("-3
") >>> >>> ElseIf objRS( "user_password" ) = password then >>> >>> checkpassword = RS( "user_id" ) >>> Response.Write("-4
") >>> >>> Else >>> >>> Response.Write("-5
") >>> >>> End If >>> >>> objRS.Close >>> Set objRS = Nothing >>> >>> End Function >>> >>> >>> Cheeers >>> Ken >>> >>> wrote in message >>> news:phx.gbl... >>>> The code below does not assign any value to "checkpassword" no matter >>>> what values are passed to the function. I have used Response.Write on >>>> all the values including the "user" table values and all values are >>>> valid. I have no clue what's wrong. Can someone provide some help? >>>> >>>> FUNCTION checkpassword( byVal useremail, byVal password, byRef Con ) >>>> >>>> sqlString = "SELECT user_id, user_email, user_password FROM users " &_ >>>> >>>> "WHERE user_email='" & useremail & "'" >>>> >>>> SET RS = Con.Execute( sqlString ) >>>> >>>> IF RS.EOF THEN >>>> >>>> checkpassword = - 1 >>>> >>>> ELSEIF RS( "user_password" ) = "" THEN >>>> >>>> checkpassword = - 2 >>>> >>>> ELSEIF RS( "user_password" ) <> password THEN >>>> >>>> checkpassword = - 3 >>>> >>>> ELSEIF RS( "user_password" ) = password THEN >>>> >>>> checkpassword = RS( "user_id" ) >>>> >>>> ELSE >>>> >>>> END IF >>>> >>>> END FUNCTION >>>> >>>> >>> >>>[/ref] >> >>[/ref] > >[/ref] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => <#U94whOsEHA.2316@TK2MSFTNGP12.phx.gbl> [htmlstate] => on_nl2br [postusername] => Ken [ip] => kenREMOVE@THISa [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [attachments] => [allattachments] => ) --> > > <% > > ' Get Login Information > > useremail = TRIM( Request.Form( "useremail" ) ) > > password = TRIM( Request.Form( "password" ) ) > > ' Open Database Connection > > Set Con = Server.CreateObject( "ADODB.Connection" ) > > Con.Open "accessDSN" > > ' Get User ID > > userID = checkpassword(useremail, password, Con) > > Response.Write "userID = " > > Response.Write userID > > Response.End > > %> > > There is still no value assigned to "checkpassword" > > > > "Ken Schaefer" wrote in message > news:%phx.gbl...[ref] > > Typo in my code: > > > > "SELECT user_id, user_password " > > > > should be > > > > "SELECT user_id, user_password " & _ > > > > Cheers > > Ken > > > > "Ken Schaefer" wrote in message > > news:phx.gbl...[ref] > >> First thing to do is work out where you code is falling to. If you do[/ref][/ref][/ref] not[ref][ref][ref] > >> have a debugger, we can use Response.Write() statements. > >> > >> Also, removed the extraneous spaces between your values and your[/ref][/ref][/ref] negative[ref][ref][ref] > >> (-) symbols > >> Lastly - don't forget to clean up your objects before exiting the[/ref][/ref][/ref] routine[ref][ref][ref] > >> > >> Function checkpassword(byVal useremail, byVal password, byRef Con) > >> > >> Dim sqlString > >> Dim objRS > >> > >> sqlString = _ > >> "SELECT user_id, user_password " > >> "FROM users " &_ > >> "WHERE user_email='" & useremail & "'" > >> > >> Set objRS = Con.Execute( sqlString ) > >> > >> If objRS.EOF then > >> > >> checkpassword = -1 > >> Response.Write("-1
") > >> > >> ElseIf objRS( "user_password" ) = "" then > >> > >> checkpassword = -2 > >> Response.Write("-2
") > >> > >> ElseIf objRS("user_password" ) <> password then > >> > >> checkpassword = -3 > >> Response.Write("-3
") > >> > >> ElseIf objRS( "user_password" ) = password then > >> > >> checkpassword = RS( "user_id" ) > >> Response.Write("-4
") > >> > >> Else > >> > >> Response.Write("-5
") > >> > >> End If > >> > >> objRS.Close > >> Set objRS = Nothing > >> > >> End Function > >> > >> > >> Cheeers > >> Ken > >> > >> wrote in message > >> news:phx.gbl... > >>> The code below does not assign any value to "checkpassword" no matter > >>> what values are passed to the function. I have used Response.Write on > >>> all the values including the "user" table values and all values are > >>> valid. I have no clue what's wrong. Can someone provide some help? > >>> > >>> FUNCTION checkpassword( byVal useremail, byVal password, byRef Con ) > >>> > >>> sqlString = "SELECT user_id, user_email, user_password FROM users " &_ > >>> > >>> "WHERE user_email='" & useremail & "'" > >>> > >>> SET RS = Con.Execute( sqlString ) > >>> > >>> IF RS.EOF THEN > >>> > >>> checkpassword = - 1 > >>> > >>> ELSEIF RS( "user_password" ) = "" THEN > >>> > >>> checkpassword = - 2 > >>> > >>> ELSEIF RS( "user_password" ) <> password THEN > >>> > >>> checkpassword = - 3 > >>> > >>> ELSEIF RS( "user_password" ) = password THEN > >>> > >>> checkpassword = RS( "user_id" ) > >>> > >>> ELSE > >>> > >>> END IF > >>> > >>> END FUNCTION > >>> > >>> > >> > >>[/ref] > > > >[/ref] > >[/ref] [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => <#U94whOsEHA.2316@TK2MSFTNGP12.phx.gbl> [htmlstate] => on_nl2br [postusername] => Mark [ip] => mschupp@ielearn [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 6 [attachments] => [allattachments] => ) -->