I tried to build a query to select data from the database, which I can use for the future login form to determine if a user is activated or not.
So in my attempt at this, I did the following:
$con = mysql_connect("localhost","steven","PASSWORD!","leercentrum");
echo("This Works");
$query = "SELECT activated FROM users WHERE username = 'steven' ";
$result = mysql_query($con, $query);
print_var($result);
The query works on my database via SQL Workbench.
I also attached a screenshot of my Mysql database (Table users).
The only thing I want is create an boolean-returning function to determine if a user is activated (return value 1
) or not activated (return value 0
).