:) Can you help me not show null values? Here's my code: eeeeeeee
require 'databasename.php';
if (isset($_GET['id'])) {
require 'databasename.php';
$id = mysqli_real_escape_string($connect, $_GET['id']);
$sql = "SELECT * FROM `example` WHERE id = '$id'";
$result = $connect->query($sql);
while($data = $result->fetch_assoc()) {
echo "<div id='moveresults'>";
echo "<div id='as'>";
echo $data['As'];
echo "</div>";
echo "<div id='so'>";
echo $data['SO'];
echo "</div>";
echo "<div id='custom'>";
if($data['Custom'] != '' || $data['Custom'] != NULL) {
echo $data['Custom'];
}
echo "</div>";
echo "<div id='local'>";
if($data['Address'] != '' || $data['Address'] != NULL) {
echo $data['Address'];
}
echo "</div>";
echo "<div id='headof'>";
if($data['Head'] != '' || $data['Head'] != NULL) {
echo $data['Head'];
}
echo "</div>";
echo "<div id='credl'>";
if($data['Credit'] != '' || $data['Credit'] != NULL) {
echo $data['Credit'];
}
echo "</div>";
echo "<div id='currenta'>";
echo $data['Current'];
echo "</div>";
echo "<div id='totalex'>";
echo $data['Exposure'];
echo "</div>";
echo "<div id='termspay'>";
if($data['Payment'] != '' || $data['Payment'] != NULL) {
echo $data['Payment'];
}
echo "</div>";
echo "<div id='overdue'>";
echo $data['Overdue'];
echo "</div>";
echo "<div id='pdc'>";
echo $data['PDC'];
echo "</div>";
echo "<div id='pending'>";
echo $data['Pending'];
echo "</div>";
echo "<div id='overallex'>";
echo $data['Overall'];
echo "</div>";
echo "</div>";
}
?>
I tried the if ! which I saw in another post but I'm thinking it's either I typed wrong format or there's another way around. Thanks again.