This is the list which generates all the links on my video section:
<?php
session_start(); // Alltid överst på sidan
// Kolla om inloggad = sessionen satt
if (!isset($_SESSION['sess_user'])){
header("Location: ../index.php");
exit;
}
?>
<html>
<head>
<style type="text/css">
<!--
A {font-family:Georgia, "Times New Roman", Times, serif;font-size: 15px; }
A:link {color:White;}
A:visited {color: Gray;}
A:hover {text-decoration: none; color: #00CCFF; font-weight:bold;}
A:active {color: #00CCFF;text-decoration: none}
}
-->
</style></head>
<br><br><br>
<div align="center">
<?php
//Inkludera filen som connectar till databasen
include "conn.php";
$query = mysql_query("SELECT * FROM videos ORDER BY id");
if (mysql_num_rows($query) <= 0) {
echo "Tomt";
} else {
while($row = mysql_fetch_array($query)) {
echo '<a href="film.php?id=',$row['id'],'&fixit=.avi">',$row['name'],'</a><br>';
}
}
?>
</div>
This is film.php, opens inside an iframe when i click a link:
<?php
session_start(); // Alltid överst på sidan
// Kolla om inloggad = sessionen satt
if (!isset($_SESSION['sess_user'])){
header("Location: ../index.php");
exit;
}
?>
<html>
<head>
<style type="text/css">
<!--
#Content
{
margin-left: 2px;
margin-right: 40px;
margin-bottom: 0px;
margin-top: 40px;
}
-->
</style></head>
<div id="Content">
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="748" height="430">
<param name="custommode" value="Stage6" />
<param name="previewImage" value="luffybox3.jpg" />
<param name="autoPlay" value="false" />
<param name="src" value="<?php echo $result['path']; ?>" />
<embed type="video/divx" src="<?php echo $result['path']; ?>" width="748" height="430" autoPlay="false" custommode="Stage6" previewImage="luffybox3.jpg" pluginspage="http://go.divx.com/plugin/download/">
</embed>
</object>
</div>
</html>