HTML gevorderde |
|
Bovenaan je pagina:
session_start();
$getal = rand(1,150);
if($getal == 1)
{
$_SESSION['credits'] = 1;
}
if($_GET['getcredits'] == 1 && $_SESSION['credits'] == 1){
$_SESSION['credits'] == 0;
// Je query's
}
if($getal == 1) { $_SESSION['credits'] = 1; } if($_GET['getcredits'] == 1 && $_SESSION['credits'] == 1){ $_SESSION['credits'] == 0; // Je query's }
Op de plaats waar je de tekst wilt:
if($_SESSION['credits'] == 1){
echo '<a href="' . $_SERVER['PHP_SELF'] . '?getcredits=1">Hier je banner wanneer credits ontvangen mogen worden</a>';
}else{
echo 'Gewone banner';
if($_SESSION['credits'] == 1){ echo '<a href="' . $_SERVER['PHP_SELF'] . '?getcredits=1">Hier je banner wanneer credits ontvangen mogen worden</a>'; }else{
|