Hey,
kann mir pls jemand folgendes Script Zeile für Zeile erkären? :)
wäre echt sehr nett. :)
Thx+MfG CeeNeo :)
kann mir pls jemand folgendes Script Zeile für Zeile erkären? :)
PHP Code:
// tabellenstruktur für images
// id (primary index, auto increment) | data (varchar) | type (varchar) | country (varchar) | name (varchar)
// funktion
function img_table($country) {
$mysqli = @new mysqli('localhost','user','password','datenbank');
$query = $mysqli->query("SELECT * FROM images WHERE country='$country'");
echo '<table';
while ($row = $query->fetch_object()){
$location = './img/tmp.' . $row->type;
$file = fopen($location, "a+");
fwrite($file, $row->data);
fclose($file);
echo '<tr>
<td>
<img src="' . $location . '">
</td>
<td> Sonstige Felder zb. name oder Nutzer ' . $row->name . ' </td>
</tr>';
}
echo '</table>';
}
wäre echt sehr nett. :)
Thx+MfG CeeNeo :)