 
			
				12/07/2010, 07:01
			
			
			     |  
      |    |    |    Fecha de Ingreso: septiembre-2008  
						Mensajes: 3
					  Antigüedad: 17 años, 1 mes 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í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í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"> telefono</span></div></TD> 
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4"> nombres </span></div></TD> 
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4"> direccion </span></div></TD> 
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4"> mail </span></div></TD> 
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4"> trabajo </span></div></TD> 
<TD bgcolor="#FFFFCC"><div align="center"><span class="Estilo4"> tipo </span></div></TD> 
</TR> 
<?php 
while($row = mysql_fetch_array($result)) { 
printf("<tr><td> %s</td><td> %s </td><td> %s</td><td> %s</td><td> %s</td><td> %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>           |