query($sql); if ($result->num_rows > 0) { $row = $result->fetch_assoc(); // You must fetch the row here $address = $row['address']; $email = $row['email1']; $phone = $row['phone']; $whatsapp = $row['whatsapp']; $logo = $row['logo']; $facebook =$row['facebook']; $instagram = $row['instagram']; $twitter = $row['twitter']; } else { echo "
No records found in the contact_info table.
"; } ?> query($sql); if ($result->num_rows > 0) { $footerrow = $result->fetch_assoc(); // You must fetch the row here $about_us = $footerrow['about_us']; $branch_address = $footerrow['branch1']; $phone1 = $footerrow['mobile1']; $phone2 = $footerrow['mobile2']; } else { echo "No records found in the footer content table.
"; } ?>