ik ben nog niet zo goed met databases maar ik wil daar alles uit kunnen halen.
Nu heb ik dit stukje code:
<?php
$query = mysql_query("SELECT * FROM top40");
$row = mysql_fetch_array($query);
echo'
<p style="margin-left: 10px; margin-top: 5px; color: #FFFFFF; font-size: 14px; "><b><?php echo "Paginas: [1]"; ?></b><a href="top40-2.php" style="color: #FFFFFF;"><?php echo " 2"; ?></a><a href="top40-3.php" style="color: #FFFFFF;"><?php echo " 3"; ?></a><a href="top40-4.php" style="color: #FFFFFF;"><?php echo " 4"; ?></a><a href="top40-5.php" style="color: #FFFFFF;"><?php echo " 5"; ?></a></p>
<div id="top40background" style="margin-top: 10px;">
<img style="position: relative; margin-top: 13px; margin-left: 30px;" src='.$row['song_image'].' />
<div id="djsays" style="position: absolute; width: 140px; height: 5px; margin-top: -16px; margin-left: 29px;"><b></b><marquee style="float: right; width: 138px; color: #E244F4; margin-top: -3px;">Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - </marquee></div>
<p style="margin-left: 190px; margin-top: -150px; color: #FFFFFF; font-size: 25px; ">'.$row['song_artist'].'</p><br>
<p style="margin-left: 190px; margin-top: -40px; color: #E244F4; font-size: 20px; ">'.$row['song_name'].'</p><br>
<p><a style="margin-left: 195px; margin-top: -10px; color: #FFFFFF; font-size: 15px;" href='.$row['song_linkvideo'].' target="_blank">Bekijk Video</a><a style="margin-left: 23px; margin-top: -10px; color: #FFFFFF; font-size: 15px; " href='.$row['song_linkartist'].' target="_blank">Artiest Info</a></p>
<object type="application/x-shockwave-flash" width="299" height="25" style="margin-left: 190px; margin-top: 0px;" data='.$row['song_songplayer'].'><param name="movie" value='.$row['song_songplayer'].' /><param name="wmode" value="transparent" /></object>
</div>
<div id="top40background2">
<img style="position: relative; margin-top: 13px; margin-left: 30px;" src="../Public/Images/BigAlbums/calvinharris_wellbecomingback.png" />
<div id="djsays" style="position: absolute; width: 140px; height: 5px; margin-top: -16px; margin-left: 29px;"><b></b><marquee style="float: right; width: 138px; color: #E244F4; margin-top: -3px;">Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - Nieuw - </marquee></div>
<p style="margin-left: 190px; margin-top: -150px; color: #FFFFFF; font-size: 25px; " >'.$row['song_artist'].'</p><br>
<p style="margin-left: 190px; margin-top: -40px; color: #E244F4; font-size: 20px; " >'.$row['song_name'].'</p><br>
'
?>
Nu heb ik een tabel aangemaakt met id = 1 en dan de informatie.
Daar haalt hij alles uit. Maar ik nog een kolom aan met id = 2 dan krijg
ik bij het 2de gedeelte toch dezelfde informatie van id 1 en niet van id 2.
hoe kan ik het zo maken dat de ene .row kijkt bij id 1 en de andere .row kijkt bij id 2 enzo.
alvast bedankt