Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--- Get user record from the database --->
- <cfquery name="userVerify" datasource="CFMLX">
- SELECT adminID, userName, passWord
- FROM AdminLogin
- @H@ WHERE userName = <cfqueryparam value="#user_name#" cfsqltype="cf_sql_varchar" />
- @H@ AND passWord = <cfqueryparam value="#hash(user_pass,'SHA-256')#" cfsqltype="cf_sql_varchar" />
- </cfquery>
- <cfif userVerify.RecordCount>
- <cfset session.allowin = "True">
- <cfset session.user_id = userVerify.adminID>
- <script>
- alert("Welcome user, you have been successfully logged in!");
- self.location="admin.cfm";
- </script>
- <cfelse>
- <script>
- alert("Your credentials could not be verified, please try again!!!");
- self.location="Javascript:history.go(-1)";
- </script>
- </cfif>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement