background

From: Date: Mon, 21 Apr 2003 08:22:51 +0000
Subject: background
Groups: php.general 
Request: Send a blank email to php-general+get-144609@lists.php.net to get a copy of this message
dear all, i have the following code to give background options to users. but when i run the code, i get the following error. Parse error: parse error in /var/www/html/bdoi_change/temptestmod.php on line 8 am not able to figure out what's wrong and where. please help. regards, diksha. <html> <head><title>Choose a template for background image</title> <script language="JavaScript"> function win (im,im1) { a=window.open ('http://192.168.0.1/bdoi_change/temptest1.ph p ?yname=<? php echo "$yname"; ?>',"","height=450,width=750,scrollbars=yes") ; } </script> </head> <body> <php echo" $default="./bgimages"; if ( ! ($dp=opendir ($default) ) ) die("cannot open"); while ($file=readdir($dp) ) $filenames[]=$file; sort( $filenames); echo""<table><tr>"; $counter=1; for($i=2;$i<count($filenames);$i++)
    {
       $pos=strpos($filenames[$i],".");
       $leng=strlen($filenames[$i]);
       $s1=substr($filenames[$i],0,$pos);
$s2=substr($filenames[$i],$pos+1,$leng);
       $path="./bgimages/".$filenames[$i];
       echo"<td><a href='#'
onClick='win(\"$s1\",\"$s2\" )'><img src=$path width=75 height=75></a></td>"; $counter=$counter+1; if($counter==10)
    {
      echo"</tr><tr>";
       $counter=1;
} } echo"</tr></table>"; closedir($dp); ?> </body> </html>

« previous php.general (#144609) next »