Hi,
Just found this forum and it looks like a wealth of info!
I'm not a coder and have a problem with the following brief bit of code (reportedly on line 22):
I cannot find the problem. If anyone can help it would be super appreciated.
Thanks
Ruchka
Just found this forum and it looks like a wealth of info!
I'm not a coder and have a problem with the following brief bit of code (reportedly on line 22):
Code:
<?php
$d = $_GET["d"];
$m = $_GET["m"];
$y = $_GET["y"];
$d = (int) $d;
$m = (int) $m;
$y = (int) $y;
$curr = time();
$olddt = mktime(0,0,0,$m,$d,$y);
$ddiff = $curr - $olddt;
$fulldays = floor($ddiff/(60*60*24));
if ($fulldays < 2) { // Change 3 to however many days you want the link to last
$bannerAd[1] = 'http://www.mysite.com’;
$adCount = count($bannerAd);
$randomAdNumber = mt_rand(1, $adCount);
header('Location: ' . $bannerAd[$randomAdNumber]);
}
else {
header('Location:http://www.mysite2.com/');
}
?>
Thanks
Ruchka
Comment