I got a code that figurse out if the user have watched that movie already or not now the wierd thing about it it let see if he watched buth not if he didnt watched:
Code:
[php]$uid = $_COOKIE[“cookname”];
$tid = $torrent[“id”];
$con = mysql_connect(“localhost”,“jornherm_acbteam”,"*******");
if (!$con)
{
die('Could not connect: ’ . mysql_error());
}
mysql_select_db(“jornherm_acbteam”, $con);
$query5 = “SELECT uid, tid FROM torrents_seen WHERE uid = ‘$uid’ AND tid = ‘$tid’”;
$gezien = mysql_query($query5);
while($row = mysql_fetch_assoc($gezien))
{
$uid2 = $row[‘uid’];
$tid2 = $row[‘tid’];
if (empty($tid2))
{
echo “<img src=”./images/notseen.png" border=“0”>";
} else {
echo “<img src=”./images/seen.png" border=“0”>";
}
}[/php]
DB Structure:
tid,uid
tid=the id of the movie
uid=the username