<?php
$db = mysql_connect("localhost", "Movies");
mysql_select_db("Movies",$db);
$result = mysql_query("SELECT id, title, size, discs, format, resolution, subtitles, sublan FROM MovieList ORDER BY title") OR DIE(mysql_error());
while($row = mysql_fetch_array($result)) {
extract($row);
?>
<?PHP
$tekst = "orange";
$bgcolor = "#252525";
$bgcolor2 = "#121212";
$current_bgcolor = $bgcolor;
if ($current_bgcolor == $bgcolor) {
$current_bgcolor = $bgcolor2;
}
elseif ($current_bgcolor == $bgcolor2) {
$current_bgcolor = $bgcolor;
}
?>
<tr>
<td bgcolor="<?php echo $current_bgcolor ?>" width="3%"><font color="white"><font face="Verdana" size="1"><?php echo $id ?></font></td>
<td bgcolor="<?php echo $current_bgcolor ?>" width="40%"><font color="<?php echo $tekst ?>"><font face="Verdana" size="1"><a href="
http://us.imdb.com/Find?<?php echo $title ?>" target="_blank" title="Read some info about this movie"><?php echo $title ?></font></a></td>
<td bgcolor="<?php echo $current_bgcolor ?>" align="right" width="6%"><font color="<?php echo $tekst ?>"><font face="Verdana" size="1"><?php echo $size ?></font></td>
<td bgcolor="<?php echo $current_bgcolor ?>" align="right" width="6%"><font color="<?php echo $tekst ?>"><font face="Verdana" size="1"><?php echo $discs ?></font></td>
<td bgcolor="<?php echo $current_bgcolor ?>" align="right" width="7%"><font color="<?php echo $tekst ?>"><font face="Verdana" size="1"><?php echo $format ?></font></td>
<td bgcolor="<?php echo $current_bgcolor ?>" align="right" width="9%"><font color="<?php echo $tekst ?>"><font face="Verdana" size="1"><?php echo $resolution ?></font></td>
<td bgcolor="<?php echo $current_bgcolor ?>" align="right" width="8%"><font color="<?php echo $tekst ?>"><font face="Verdana" size="1" title="<?php echo $sublan ?>"><?php echo $subtitles ?></font></td>
<?php
}
mysql_close();
?>
</table>