Dateiname: sort3.php

Code - ab nachfolgender Zeile kopieren und unter sort3.php speichern:

<?php
$id = $_REQUEST['id'];
$con = mysql_connect("host","datenbank","passwort");

if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("datenbank", $con);
$result = mysql_query("SELECT id, image, legend FROM ducks WHERE id='" . $id . "'");
$row = mysql_fetch_array($result);

echo '<div style="float:left;padding-right:10px;padding-bottom:10px;">
<img src="' . $row['image'] . '"></div>';
echo $row['legend'] . "

"; mysql_close($con); ?>
Code - bis zur obigen Zeile kopieren und unter sort3.php speichern: