Re: Help! what am i doing wrong?

From: Date: Thu, 03 Aug 2000 21:25:52 +0000
Subject: Re: Help! what am i doing wrong?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10036@lists.php.net to get a copy of this message
on 8/3/00 2:18 PM, Maximo at lista@dynastar.com.ar wrote: > Hi! > > This is the error: > Parse error: parse error, expecting ','' or > ';'' in > /home/maximo/sonline.php3 on line 48 > what am i missing? > > TIA > Max > > <?php > if ($nombre<>"" and $direccion<>"" and > $telefono<>"") > { > mail("lista@dynastar.com.ar", "Sonline", "Nombre - $nombre Dirección > - > $direccion Teléfono: - $telefono" ); > echo "<b><center>Gracias $nombre, nos comunicaremos a la > brevedad.</center></b>"; > } elseif ($nombre == "" ) { > echo "<center><b>Por favor, introduzca su nombre y > apellido.</b></center>"; > echo "<center><a href="sonline.htm"><img > src="imagenes/sonline.jpg" > width="260" height="38" border="0" > alt="Subscripci&oacute;n On > line"></a></center>"; > } elseif ($direccion == "") { > echo "<center><b>Por favor, introduzca su > dirección.</b></center>"; > echo "<center><a href="sonline.htm"><img > src="imagenes/sonline.jpg" > width="260" height="38" border="0" > alt="Subscripci&oacute;n On > line"></a></center>"; > } elseif ($telefono == "") { > echo "<center><b>Por Favor, introduzca su numero de > teléfono.</b></center>"; > echo "<center><a href="sonline.htm"><img > src="imagenes/sonline.jpg" > width="260" height="38" border="0" > alt="Subscripci&oacute;n On > line"></a></center>"; > } else { > echo "todo mal"; > } > ?> It woudl help if you told us which line is 48. But to answer your question, unless there was a problem with some escape chars going wierd, I bet your problem is on this line: echo "<center><a href="sonline.htm"><img src="imagenes/sonline.jpg" Can't have " inside another ". If you want to echo a " you'll have to escape it so it doesn't screw up the PHP parser: try \" -k

« previous php.general (#10036) next »