Witam to znowu ja (jakby nie inaczej ^^) Zastanawiam się gdzie umieścić COOKIE, aby dobrze działało i mam z tym mały problem, ponieważ gdzie nie gdzie bym umieścił to zawsze się dodaje za wcześnie. Proszę o pomoc (IMG:
style_emoticons/default/smile.gif)
pooldj.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="pl" />
<meta name="Robots" content="ALL" />
<link rel="stylesheet" href="/css/style.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="/css/menu.css" />
<script src="js/stuHover.js" type="text/javascript"></script>
<title>Bassplay - Najlepsza Muzyka</title>
</head>
<body>
<div id="container">
<div id="menu"><?php include("../includes/menu.php"); ?></div>
<div id="contenttop"></div>
<div id="content">
<center>
<?php
if ($_COOKIE['glosowal'] !== 'oddalglos'){
if (isset($_GET['pool'])) {
$query = sprintf('UPDATE djpool SET glosy = glosy + 1 WHERE dj = "%s"', $dj); echo ("Twój głos został poprawnie oddany na "); }
else
{
echo ("Proszę zaznaczyć 1 z DJ'ów"); }
}
else {
echo ("Już oddałeś/aś swój głos"); }
?>
</center>
</div>
<div id="contentbottom"><div class="floatend"></div></div>
<div id="logo"></div>
</div>
</body>
</html>
viewpool.php?id=1
Głosowanie na najlepszego DJ'a
<br><br>
<form action="/php/pooldj.php" method="get">
<input type="radio" value="DJ Cherry" name="pool">DJ Cherry<br>
<input type="radio" value="DJ Pastyl" name="pool">DJ Pastyl<br>
<input type="radio" value="DJ Mario" name="pool">DJ Mario<br>
<input type="radio" value="Hard Player" name="pool">Hard Player<br>
<input type="radio" value="Perzyk" name="pool">Perzyk<br>
<input type="radio" value="DJ Tasior" name="pool">DJ Tasior<br>
<input type="submit" value="Wyślij">
</form>
viewspecial.php?id=1
<?php
$djpoolmysql = "SELECT*FROM djpool";
?>
<table border="1">
<tr>
<td width="200">
<?php echo $row['dj']; ?><td width="20">
<?php echo $row['glosy']; ?></td>
</tr>
</table>
<?php }
?>
<?php
if ($_SERVER['REMOTE_ADDR'] == '89.228.133.112'){
}
?>