query(" SELECT productID, model, description, imagePath FROM products ORDER BY RAND() LIMIT 1 "); if ($stmt && $stmt->num_rows > 0) { $randomProduct = $stmt->fetch_assoc(); $rID = (int)$randomProduct['productID']; $rModel = htmlspecialchars($randomProduct['model'] ?? ''); $rDesc = htmlspecialchars($randomProduct['description'] ?? ''); $rImg = htmlspecialchars($randomProduct['imagePath'] ?? 'assets/images/placeholder.png'); ?>
= (mb_strlen($rDesc) > 120) ? mb_substr($rDesc, 0, 120) . '...' : $rDesc ?>
Jetzt ansehen ›