<?
mysql_connect("localhost","kndvd","GLEM DET");
mysql_select_db("mp3");
$query = mysql_query("SELECT * FROM mp3 ORDER BY id") OR DIE mysql_error();
echo "<ol>";
while($r = mysql_fetch_array($query)) {
$title = $r["title"];
$genre = $r["genre"];
$cd = $r["cd"];
$dato = $r["dato"];
echo "$title - $genre - $cd CDér - $dato";
}
echo "</ol>";
?>
Prøv det. Du skulle også overveje at lave den her om:
echo "$title - $genre - $cd CDér - $dato";
I cant do it captain, i dont have the powa\\\\\\'!
Dur ikke ... Har lavet den om til!
<?
mysql_connect("localhost","kndvd","GLEM DET");
mysql_select_db("mp3");
$query = mysql_query("SELECT * FROM mp3 ORDER BY id")
while($r = mysql_fetch_array($query)) {
$title = $r["title"];
$genre = $r["genre"];
$cd = $r["cd"];
$dato = $r["dato"];
echo "$title - $genre - $cd CDér - $dato";
}
?>
og nu kommer fejlen
Parse error: parse error, unexpected T_WHILE in /web/www/frac/users/kndvd/dvdlibary.php on line 13
...
Line 13 er while($r = mysql_fetch_array($query)) {
[Redigeret d. 15/06-05 11:26:15 af Patrick kerwood]