rernanded
Erfahrenes Mitglied
Hi, habe mal rumprobiert ob ich es schaffe Werte aus der DB in images zu wandeln und direkt anzeigen zu lassen.
Ergab bisher nur Sonderzeichen-Salat mit nur einem image.
Brauche Idee.
Moni
Ergab bisher nur Sonderzeichen-Salat mit nur einem image.
Brauche Idee.
Moni
PHP:
<?php
$servername = "localhost:3306";
$username = "";
$password = "";
$dbname = "";
$connection = new mysqli($servername, $username, $password, $dbname);
if ($connection->connect_error) {
die("Connection failed: " . $connection->connect_error);
}
$sql = "SELECT spalte1,spalte2 FROM soundso ORDER BY id DESC";
$result = $connection->query($sql);
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
$img = imagecreate(900, 300);
$green = imagecolorallocate($img, 0, 255, 0);
$black = imagecolorallocate($img, 0, 0, 0);
imagefilledrectangle($img, 0, 0, 10, 10, $green);
imagestringup($img, 30, 100, 300, $row["spalte1"], $black);
//header('Content-type: image/png');
imagepng($img);
$wau = array("imagepng($img)");
foreach($wau as $key => $wauwau) {
???
}
echo "Kontrolle:<br />":
echo $row["spalte1"];
echo "<br />";
echo $row["spalte2"];
}
} else {
echo "Kein/e Ergebnis/se.";
}
$connection->close();
?>