You can use this logic to achieve your functionality
<?php
$todayDate = date('Y-m-d');
//modify this query based on your framework
$userTodayResult = "select * from user_login where user_id = ".$userId." and login_date = "$todayDate"";
if(empty($userTodayResult)){
//insert your record with today date
}
?>