Fitting this thumbnail code into my divs.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
thme
Forum Newbie
Posts: 3
Joined: Mon Oct 10, 2011 4:38 pm

Fitting this thumbnail code into my divs.

Post by thme »

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.

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 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
Post Reply