bckgrnd

From: Date: Mon, 21 Apr 2003 10:30:31 +0000
Subject: bckgrnd
Groups: php.general 
Request: Send a blank email to php-general+get-144619@lists.php.net to get a copy of this message
dear all, following is a code for users to choose background options. but when i run it i get Parse error: parse error in /var/www/html/bdoi_change/temptest1.php on line 14 thanks, diksha. <html> <head><title>Choose a template for background image</title> <script language="JavaScript"> function win (im,im1) { a=window.open ('http://www.192.168.0.1/bdoi_change/temptest1.php ?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 (#144619) next »