I had a PHP script that is supposed to automatically rotate advertisement banners, and it was working just fine before, but after i tried changing 1 piece of the code it stopped working. Even after i changed it back it still wouldn't work anymore. I don't get any errors, and no error_log files, the only part of the code i changed was just the url of the page its supposed to redirect you to. Here's my code (before the change):
<?php
$bCount = 1;
$bCode[$bCount] = '<a href="https://somewebsite.net/" target="_blank"><img src="/img/ad1.gif"/></a>';
$bCount++;
$bTotals = $bCount -1;
if ($bTotals>1)
{
mt_srand((double)microtime() * 1234567);
$bPick = mt_rand(1, $bTotals);
}
else
{
$bPick = 1;
}
$ad = $bCode[$bPick];
?>
and here is the code after i made the small change (really not much of a difference, just a change in the URL):
<?php
$bCount = 1;
$bCode[$bCount] = '<a href="http://somewebsite.net/" target="_blank"><img src="/img/ad1.gif"/></a>';
$bCount++;
$bTotals = $bCount -1;
if ($bTotals>1)
{
mt_srand((double)microtime() * 1234567);
$bPick = mt_rand(1, $bTotals);
}
else
{
$bPick = 1;
}
$ad = $bCode[$bPick];
?>
After i made that change, the script wouldn't display the ad that was supposed to show up, it was just blank. So i rolled back the changes to how it was before when it was working, and it still will not show up anymore. What could have caused it to stop working?