Re: background

From: Date: Mon, 21 Apr 2003 09:16:54 +0000
Subject: Re: background
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144613@lists.php.net to get a copy of this message
a=window.open ('http://192.168.0.1/bdoi_change/temptest1.ph p ?yname=<? php echo "$yname"; ?>',"","height=450,width=750,scrollbars=yes") It seems to be involving this bit of code. I would say the <? php echo "$yname"; ?> is causing the problem, and you will need to remove the space between the <? and the php. Assuming there is one. ----- Original Message ----- From: "Diksha Neel" <diksha_neel@rediffmail.com> To: <php-general@lists.php.net> Sent: Monday, April 21, 2003 6:22 PM Subject: [PHP] background > 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> > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#144613) next »