Terribly embarrassed about this, it has to be obvious, but I cannot see it:
Here is code snippet:
$spok = false;
if (isset($_SESSION['uid'])) {
$qrys = "SELECT * from steps where uid = " . $_SESSION['uid'];
$ress = mysqli_query($link, $qrys);
$ns = mysqli_num_rows($ress);
if ($ns != 0) {
$stps = mysqli_fetch_array($ress,MYSQLI_ASSOC);
if ($stps['initial'] == "Y") {
$spok = true;
}
}
}
if (! isset($spok)) {
$spok = false;
}
echo "spok = " . $spok . "<br>";
The echo shows spok =
No value. How can it not be either 0 or 1?