Re: banner rotator
| From: | Tom Rogers | Date: | Wed, 07 May 2003 11:43:50 +0000 |
| Subject: | Re: banner rotator | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146651@lists.php.net to get a copy of this message | ||
Hi,
Wednesday, May 7, 2003, 9:38:52 PM, you wrote:
ABBdS> is something wrong with this script?
ABBdS> Message from the server:
ABBdS> Parse error: parse error, unexpected T_SWITCH in C:\Arquivos de
ABBdS> programas\Apache Group\Apache2\htdocs\testads.html on line 34
ABBdS> a.
ABBdS> THE SCRIPT:
ABBdS> <?php
ABBdS> srand( microtime * 1000000);
ABBdS> $num = rand(1,4)
ABBdS> switch($num)
ABBdS> {
ABBdS> case 1 : $img="ad-panashop.gif"
ABBdS> $url="áÎ?4Œ-
ABBdS> ÛØR™J¶http://www.panashop.com.br/files/pags/ShoWDetail.asp?Coditprod=11277&CodProd=9869&Precode=699&Precopor=699&titulo=DVD%20FOTO-CD%20E%20KARAOKE%20PHILIPS%20DVD616&CodDf=DVD616&setor=14&cv=14";
ABBdS>
ABBdS> break;
ABBdS> case 1 : $img="ad-vw.gif"
ABBdS> $url="http://www.volkswagen.com.br/default.asp";
ABBdS> break;
ABBdS> case 1 : $img="ad-panashop.gif"
ABBdS>
ABBdS> $url="http://www.panashop.com.br/files/pags/ShoWDetail.asp?Coditprod=11277&CodProd=9869&Precode=699&Precopor=699&titulo=DVD%20FOTO-CD%20E%20KARAOKE%20PHILIPS%20DVD616&CodDf=DVD616&setor=14&cv=14";
ABBdS>
ABBdS> break;
ABBdS> case 1 : $img="ad-vw.gif"
ABBdS> $url="http://www.volkswagen.com.br/default.asp";
ABBdS> break;
ABBdS> }
ABBdS> $banner = "<a href=\"$url\"> ";
ABBdS> $banner = "<img src=\"$img\"> ";
ABBdS> $banner = "</a>";
ABBdS> echo($banner);
?>>
This line needs terminating with a ;
$num = rand(1,4) <<<<<
--
regards,
Tom