im trying to check if the row in table is empty and the session also in , can i know what im doing wrong here.
if (empty($row['images']) && (!isset($_SESSION['picture']) || $_SESSION['picture'] == ''))
EDIT : posting the code as im trying to post some divisions based on the picture, and if there are no picture i post a demo. i hope i explained it right.
if (mysqli_multi_query($conn, $sql)) {
do {
if ($result = mysqli_store_result($conn)) {
while ($row = mysqli_fetch_array($result)){
if (empty($row['images']) && (!isset($_SESSION['picture']) || $_SESSION['picture'] == '')){
echo "<div>" ;
echo " <img src='images/logo.png' alt=""/>";
echo " <h1>This Is A Demo</h1>";
echo " <p>This is a Demo paragraph .</p>";
echo" <a href='../go_back.php'>Demo</a>";
echo "</div>" ;
} else{
echo "<div>" ;
if(!empty($row['images'])) {
echo " <img src='images/users_iamge.png' alt=""/>";
echo " <h1>Not Demo</h1>";
echo " <p>This is Not Demo paragraph .</p>";
}else{ // fetch the session
echo " <img src='images/users_iamge.png' alt=""/>";
echo " <h1>Not Demo</h1>";
echo " <p>This is Not Demo paragraph .</p>";
}
}
echo'<h1>'
echo'<p>'
echo "</div>";
}
mysqli_free_result($result);
}
} while (mysqli_more_result($conn));
}