if($_POST['user_id'] = '')
means:
$_POST['user_id']
becomes ” .. if ('')
// always false
if($_POST['user_id'] == '')
means:
$_POST['user_id']
compares to ” .. if ( comparison)
solved PHP not showing error when I put only single = in if condition