Ver Mensaje Individual
  #1 (permalink)  
Antiguo 12/07/2010, 07:01
javamell
 
Fecha de Ingreso: septiembre-2008
Mensajes: 3
Antigüedad: 15 años, 7 meses
Puntos: 0
metodo get no me funciona

tengo un problema al pasar un get de un html a php, cuando lo recibo me sae un error este es el codigo:

esto es lo que no se
$result=mysql_query("select * from amigos WHERE telefono like $HTTP_GET_VARS["tele"]",$link);

ESTE ES EL ERROR
Parse error: syntax error, unexpected '"', expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\Archivos de programa\EasyPHP-5.3.2i\www\prueba.php on line 25


este es el codigo completo
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo4 {color: #000000; font-family: Arial, Helvetica, sans-serif; }
-->
</style>
</head>

<body>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
</head>
<body>
<?php
$buscar = "3126586823";
include("conex.phtml");
$link=Conectarse();
$result=mysql_query("select * from amigos WHERE telefono like $HTTP_GET_VARS["tele"]",$link);
?>
<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>
<TR bordercolor="#333333"><TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4">&nbsp;telefono</span></div></TD>
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4">&nbsp;nombres&nbsp;</span></div></TD>
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4">&nbsp;direccion&nbsp;</span></div></TD>
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4">&nbsp;mail&nbsp;</span></div></TD>
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4">&nbsp;trabajo&nbsp;</span></div></TD>
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4">&nbsp;tipo&nbsp;</span></div></TD>
</TR>
<?php
while($row = mysql_fetch_array($result)) {
printf("<tr><td>&nbsp;%s</td><td>&nbsp;%s&nbsp;</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td></tr>",
$row["telefono"],$row["nombre"],$row["direccion"],$row["mail"],$row["trabajo"],$row["tipo"]);
}
mysql_free_result($result);
mysql_close($link);
?>
</table>
</body>
</html>