Difference between revisions of "Custom Login Form"

 
Line 1: Line 1:
Use this sample form. Make sure you change "http://www.tcadmin.com:8880/Interface/Base/Login.aspx" to your control panel's Login.aspx.
+
Use this sample form. Make sure you change "http://www.tcadmin.com:8880/Login" to your control panel's Login.aspx.
  
<source lang="html4strict"><form method="POST" action="http://www.tcadmin.com:8880/Interface/Base/Login.aspx">
+
<source lang="html4strict"><form method="POST" action="http://www.tcadmin.com:8880/Login">
 
   <table border="0">
 
   <table border="0">
 
     <tr>
 
     <tr>

Latest revision as of 16:12, 24 August 2021

Use this sample form. Make sure you change "http://www.tcadmin.com:8880/Login" to your control panel's Login.aspx.

<form method="POST" action="http://www.tcadmin.com:8880/Login">
  <table border="0">
    <tr>
        <td>User:</td>
        <td><input type="text" name="USERID" size="20"></td>
    </tr>
    <tr>
        <td>Password:</td>
        <td><input type="password" name="PASSWORD" size="20"></td>
    </tr>
  </table>
  <input type="submit" value="Login"><input type="reset" value="Reset">
</form>

Validate a password programmatically

If you want to add custom server side code to your login form you can validate the password with this MySQL query. Replace "Admin" with the user that is logging in and "PASSWORD-HERE" with the password entered by the user. If the value of "correct_password" is 1 the password is correct.

SELECT (SHA2(concat('PASSWORD-HERE', password_salt), 512) = password_hash) as is_valid FROM tc_users WHERE user_name='Admin';
Retrieved from "https://help.tcadmin.com/index.php?title=Custom_Login_Form&oldid=2452"