z0oL
Erfahrenes Mitglied
Das is das Script:
PHP:
<?PHP
$db = mysql_connect();
$res = mysql_db_query("test", "select * from personen");
mysql_close($db);
echo "<table border=1 cellspacing=0 cellpadding=0 bordercolor=white>";
if(!empty($id))
{
$query = mysql_query("SELECT * FROM personen WHERE id = '$id'");
if(mysql_num_rows($query))
{
while($row = mysql_fetch_array($query))
{
echo "Name:" .$row['name']."<br>\n";
echo "Nachname:" .$row['nachname']."<br>\n";
}
}
else
echo "Error! Kein User mit dieser ID!";
}
echo "<table>";
while($zeile = mysql_fetch_array($res))
{
echo '<tr><td width=50 >';
echo $zeile["vorname"] . "</td><td width=50>";
echo $zeile["name"] . "</td><td>";
echo '<a href="'.$PHP_SELF.'?id='.$id.'">more</a></font></td></tr>';
}
echo "</table>";
?>
Zuletzt bearbeitet: