I have to make a note website for school, so i made a database which saves some data of the notes and made a page which shows a the notes like this:
http://postimage.org/image/urljhc4nn/
but as you can see it shows my data from the database double and i know why but i don't know how to fix it, this is my current code:
And here some of my css file to give you more info on how it works:PHP Code:<span class="not">Notities</span>
<?php
$link = mysql_connect("localhost","root","") or die("Verbinding mislukt!");
mysql_select_db("htmleind") or die("Database niet beschikbaar!");
$result = mysql_query("SELECT * FROM notities
ORDER BY datum DESC;") or die("Fout bij uitvoeren query!");
while ($line = mysql_fetch_row($result)) {
?>
<div class="polaroid rotate_left">
<label><b><?php print $line[3]?></b></label> <!-- Name of note from database -->
<a href="delete.php?delete_id=<?php print $line[0] ?>">
<img class="delete" src="Afbeeldingen/delete.png"/></a><br/>
<label><?php print $line[5] ?></label></br> <!-- Date from database -->
<br/>
<label><?php print $line[6]?></label><br/> <!-- Note from database -->
<br/>
<label><?php print $line[1]?> <?php print $line[2]?></label> <!-- name from database -->
</div>
<div class="polaroid rotate_right">
<label><b><?php print $line[3]?></label></b> <!-- Name of note from database -->
<a href="delete.php?delete_id=<?php print $line[0] ?>"><img class="delete" src="Afbeeldingen/delete.png"/></a><br/>
<label><?php print $line[5] ?></label><br/> <!-- Date from database -->
<br/>
<label><?php print $line[6]?></label><br/> <!-- Note -->
<br/>
<label><?php print $line[1]?> <?php print $line[2]?></label> <!-- Name -->
<br/>
</div>
<?php
}
mysql_close($link);
?>
Thanks in advance!Code:div.polaroid { font-family: cool_font; font-size:1.6em; width:294px; padding:10px 10px 20px 10px; border: 1px solid #000000; background-color:white; box-shadow:2px 2px 3px #000000; background: #faf38b } div.rotate_left { float:right; -ms-transform:rotate(7deg); /* voor in IE 9 */ -moz-transform:rotate(7deg); /* voor in Firefox */ -webkit-transform:rotate(7deg); /* voor in Safari and Chrome */ -o-transform:rotate(7deg); /* voor in Opera */ transform:rotate(7deg); } div.rotate_right { float:left; -ms-transform:rotate(-8deg); /* voor in IE 9 */ -moz-transform:rotate(-8deg); /* voor in Firefox */ -webkit-transform:rotate(-8deg); /* voor in Safari and Chrome */ -o-transform:rotate(-8deg); /* voor inOpera */ transform:rotate(-8deg); }


Reply With Quote

Bookmarks