Fitting this thumbnail code into my divs.
Posted: Wed Oct 19, 2011 6:37 am
hey guys i am working on my FIRST website ever..
i am trying to fit this php code to so when ever i upload a video link to the database it prints in the divs from left to right. ( i have made blank boxes for where the videos should be, so you guys can see what i mean. i will give you the code here.
and the website is here, http://www.game4vids.com/index.php
and i also want it so once i have used up all the boxes it posts the new video in box one and overwrites the old one if you get what i mean.
This website is a great example of what i mean.
http://www.retardo.dk
i am trying to fit this php code to so when ever i upload a video link to the database it prints in the divs from left to right. ( i have made blank boxes for where the videos should be, so you guys can see what i mean. i will give you the code here.
Code: Select all
<?php
$query = mysql_query("SELECT * FROM `G4V_Videos` ORDER BY `id` DESC") or die(mysql_error());
while ($data = mysql_fetch_array($query)) {
?>
ID-nummer: <?php print $data['id']; ?> - Name: <?php print $data['navn']; ?> - <a href="/Video.php?id=<?php print $data['id']; ?>"><img src="http://i.ytimg.com/vi/<?php print $data['link'];?>/hqdefault.jpg" width="200" height="160" /></a><br /> <a href="/Video.php?=<?php print $data['id']; ?>">
<?php
}
?>and i also want it so once i have used up all the boxes it posts the new video in box one and overwrites the old one if you get what i mean.
This website is a great example of what i mean.
http://www.retardo.dk