jaja men hvordan lave jeg sådan st folk kan stemme på dem = =??
mp3er.php skal se sådan her ud:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Mine MP3 numre</title>
</head>
<body>
<h3 align="center">Mine mp3 numre</h3><br>
<br>
<?
mysql_connect("localhost","root");
mysql_select_db("mp3");
if($_GET["rate"] && $_GET["id"])
{
mysq_query("UPDATE mp3numre SET point = point + ".(int)($_GET["rate"]).", antal_stemmer = antal_stemmer + 1 WHERE id = ".$_GET["id"]);
}
$query = mysql_query("SELECT * FROM mp3numre ORDER BY id");
echo "<font color=\\"red\\"><ol>";
while($r = mysql_fetch_array($query)) {
$kunstner = $r["kunstner"];
$titel = $r["titel"];
$dato = $r["dato"];
echo "<li>$kunstner - $titel blev tilføjet $dato";
echo "<a href='".$PHP_SELF."?id=".$r["id"]."&rate=1'>1</a>";
echo "<a href='".$PHP_SELF."?id=".$r["id"]."&rate=2'>2</a>";
echo "<a href='".$PHP_SELF."?id=".$r["id"]."&rate=3'>3</a>";
echo "<a href='".$PHP_SELF."?id=".$r["id"]."&rate=4'>4</a>";
echo "<a href='".$PHP_SELF."?id=".$r["id"]."&rate=5'>5</a>";
}
echo "</ol></font>";
?>
</body>
</html>
xtra sql:
ALTER TABLE `mp3numre` ADD `antal_stemmer` INT DEFAULT '0' NOT NULL ,
ADD `point` INT DEFAULT '0' NOT NULL ;
Hilsen Mathias