Quantcast
Viewing latest article 29
Browse Latest Browse All 51

Answer by andrewsi for User Active Check

The issue is here:

$userRow=$stmt->fetch(PDO::FETCH_ASSOC); 
if($userRow == '0'){

You're getting an associative array back from fetch, and comparing it with 0 on the next line. Instead, you want to check the value for the column you've selected in your query, and compare with that:

$userRow=$stmt->fetch(PDO::FETCH_ASSOC); 
if($userRow['activedd'] == '0'){

Viewing latest article 29
Browse Latest Browse All 51

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>