so I created this login in form using HTML and PHP. I used md5 encryption to encrypt the password on the database. Now when a user tries to login the database is only accepting the encrypted password. What is the best course for this?
$user_name = $_POST['user_name'];
$password = md5($_POST['password']);
if(!empty($user_name) && !empty($password) && !is_numeric($user_name))
{
//save to database
$user_id = random_num(20);
$query = "insert into users (user_id,user_name,password) values ('$user_id','$user_name','$password')";
What is the best course of action to use here.