i have been trying this script from morninig and i didn know why it doesnt work?
i have it working in smarty but when i try to take the same code and put it in one php file it never works

the database works,as i enter the add link or image in to the city tables as id's
for example Paris has (1|2|3|4)
and this is the id's of the banner added in another table
this is the code
PHP Code:
<?php
    
require('lib/load_configuration.php');
    
    
//$smarty->assign('test','saurabh');
    
$city=1;
    if(isset(
$_GET['cty']))
    {
        
$city=$_GET['cty'];
    }
    

    
    
$cities=array();
    
$query="select * from vz_cities_tbl  where VCI_ID='".$city."'";
    echo 
$query;
    
$result=mysql_query($query);
    if(
mysql_num_rows($result)>0)
    {
        
$city=mysql_fetch_array($result);
        
        
$topBanners=explode('|',$city['VCI_Top_Banner']);
        

        
$cnt=0;
        
        foreach(
$topBanners as $topBanner)
        {
            
$query="select VB_File,VB_Link,VB_Type from vz_banner_tbl where VB_ID='".$topBanner."'";
            
$result=mysql_query($query);
            
$row=mysql_fetch_array($result);
            
$city['VB_File'][]=$row['VB_File'];
            
$city['VB_Link'][]=$row['VB_Link'];
            
$city['VB_Type'][]=$row['VB_Type'];            
        
            if(
$row['VB_Type']=='1')
            {    
                
$tempImg='<img src="admin/uploaded_files/banner/'.$row['VB_File'].'" border="0" />';
                
$jsTopBanners.=$tempImg;
                
            }
        
            elseif(
$row['VB_Type']=='2')
            {
                
$jsTopBanners.="slides[".$cnt."]='".$row['VB_File']."';";
            }
            
$cnt++;                        
        }
    
print_r($jsTopBanners);    
            
    }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link href="css/main.css" rel="stylesheet" type="text/css" />

<script type="text/javascript">
    var t;



    var totalSlides=slides.length;

    var currentSlide=-1;


    function changeSlide()
    {    
    
        if(currentSlide==totalSlides-1)
        {
            currentSlide=-1;
        }    
        currentSlide++;
        document.getElementById('topBanner').innerHTML=slides[currentSlide];        
        t=setTimeout("changeSlide()",15000);
    }
    
    function callSlideFns()
    {
        if(totalSlides>0)
        {
            changeSlide();
        }
        if(totalSideSlides>0)
        {
            changeSideSlide();
        }
    }    
</script>



</head>
<body onload="callSlideFns()">

<div id="topBanner"></div>

</body>