$query = "SELECT itemName, prize, imageLink, czyOdebrany FROM user_items WHERE ownerID = '".$userId."' ";
if ($result = $mysqli->query($query)) {
while ($row = $result->fetch_assoc()) {
if($row['itemName'] == 'Worek Hajsu'){
echo '<div class="widget-element widget-equipment-element widget-item dis-inl-blo"><p style="font-size: 16px;">'.$row['itemName'].' <span style="color: cyan;">'.$row['prize'].'PLN</span></p><hr><img src="'.$row["imageLink"].'" alt="Błąd Wczytywania Zdjęcia. Zresetuj Przeglądarke!" class="widget-image-price"><br><form action="odbierz.php" method="post"><input type="text" required value="'.$row['itemName'].'" name="true" style="width: 0px; height: 0px; opacity: 0;"><br><button class="btn btn-outline-danger" type="button">Odebrano!</button></form></div>';
}
else{
if($row['czyOdebrany'] == '1'){
echo '<div class="widget-element widget-equipment-element widget-item dis-inl-blo"><p style="font-size: 16px;">'.$row['itemName'].' <span style="color: cyan;">'.$row['prize'].'PLN</span></p><hr><img src="'.$row["imageLink"].'" alt="Błąd Wczytywania Zdjęcia. Zresetuj Przeglądarke!" class="widget-image-price"><br><form action="odbierz.php" method="post"><input type="text" required value="'.$row['itemName'].'" name="true" style="width: 0px; height: 0px; opacity: 0;"><br><button class="btn btn-outline-danger" type="button">Odebrano!</button></form></div>';
}
else {
echo '<div class="widget-element widget-equipment-element widget-item dis-inl-blo"><p style="font-size: 16px;">'.$row['itemName'].' <span style="color: cyan;">'.$row['prize'].'PLN</span></p><hr><img src="'.$row["imageLink"].'" alt="Błąd Wczytywania Zdjęcia. Zresetuj Przeglądarke!" class="widget-image-price"><br><form action="odbierz.php" method="post"><input type="text" required value="'.$row['itemName'].'" name="true" style="width: 0px; height: 0px; opacity: 0;"><br><button class="btn btn-outline-success" type="submit">Odbierz!</button></form></div>';
}
}
// <div class="widget-element widget-equipment-element widget-item dis-inl-blo"><h5>", $row["itemName"], "</h5><br><img class='widget-item-image' src='".$row["imageLink"]."'><br><button type='submit' class='btn btn-success'>Odbierz</button></div>"
}
$result->free();
}
Witam *. Ostatnio Robie Stronke (podobną do key-drop.pl itd...) obecnie robie ekwipunek użytkownika i mam mały problem. Chce zrobić że jeżeli ktoś nie będzie miał żadnych itemów w eq to wyświeli echo '<h6>Brak Przedmiotów w eq</h6>';
KOD: