PHP beginner |
|
Ik heb hier dit script
<?
if(isset($_COOKIE['tijd'])){
$query = mysql_query("SELECT * FROM `leden` WHERE bouw > NOW()
AND `id` ='".mysql_real_escape_string($_SESSION['log_id'])."'")or die(mysql_error());
if(mysql_num_rows($query) == 0){
unset($_SESSION['pro_id'], $_SESSION['soort'], $_SESSION['level']);
}
} else {
$_SESSION['level'] = $_SESSION['level'] - 1;
header('Refresh: 60; URL=index.php?p=levels');
echo'<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="CFAF76">
<tr>
<td width="100%" align="center" bgcolor="#69292D"><img src="img/stop.png" heigth="12" width="13" /> <a href="index.php?php?p=stop#'.$_SESSION['pro_id'].'" class="contentlinks"><font color="white">De upgrade is over <b>'.date('i:s', $_COOKIE['tijd'] - time() ).'</b> min 100% voltooid naar';?> (Level <?=ucfirst($_SESSION['level'])?>) <?echo'</font></a></td>
</tr>
</table>'. $_SESSION['soort'];
}
?>
<? if(isset($_COOKIE['tijd'])){ $query = mysql_query("SELECT * FROM `leden` WHERE bouw > NOW() unset($_SESSION['pro_id'], $_SESSION['soort'], $_SESSION['level']); } } else { $_SESSION['level'] = $_SESSION['level'] - 1; header('Refresh: 60; URL=index.php?p=levels'); echo'<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="CFAF76"> <tr> <td width="100%" align="center" bgcolor="#69292D"><img src="img/stop.png" heigth="12" width="13" /> <a href="index.php?php?p=stop#'.$_SESSION['pro_id'].'" class="contentlinks"><font color="white">De upgrade is over <b>'.date('i:s', $_COOKIE['tijd'] - time() ).'</b> min 100% voltooid naar';? > (Level <?=ucfirst($_SESSION['level'])?>) <? echo'</font></a></td> </tr> </table>'. $_SESSION['soort']; } ?>
Ik wil nu $_COOKIE['tijd'] leeg maken als de tijd die daar opgeslagen staat klaar is maar het wilt iet lukken.
|