Re: Error el buscar.php

From: Date: Tue, 11 Dec 2001 17:17:12 +0000
Subject: Re: Error el buscar.php
References: 1  Groups: php.general.es 
Request: Send a blank email to general-es+get-16634@lists.php.net to get a copy of this message
si tienes que asignar a variables lo que te regrese la funcion mysql_connect asi: $conexion=mysql_connect("localhost","user","pass"); en mysql_select_db dale la base de datos y el enlace asi: mysql_select_db("nombre_bd",$conexion); Suerte Xytras ----- Original Message ----- From: "Root - Barra Home" <root@barrahome.com> To: <lista@phpes.com> Sent: Wednesday, December 12, 2001 6:06 AM Subject: [PHP-ES] Error el buscar.php > > Alguien me dice que hice mal ??? > > Parse error: parse error in c:\home\www\buscador\buscador.php on line 20 > > <!doctype html public "-//W3C//DTD HTML 4.0 file://EN"> > <html> > <head> > <title>Buscador - 0.1</title> > </head> > <body> > <form method="GET" action="<? PHP_SELF; ?>"> > <input type="text" name="search" size=25 maxlength=25> > <input type="Submit" name="Submit" value="Submit"> > </form> > <? > mysql_connect("server","root","root"); > mysql_select_db("search"); > $result = mysql_query ("SELECT * FROM search WHERE url LIKE > '%$search%'"); > while($r=mysql_fetch_array($result)) > { > $que=$r["categorias"]; > echo $que; > echo "<br>"; > } else { /* Linea 20 */ > echo "Nada Encontrado"; > } > ?> > > </body> > </html> > > > --------------------------------------------------------------------- > Archivo On-line: http://www.phpes.com/ > Manual PHP en español: http://www.php.net/manual/es/ > Para dar de baja la suscripción, mande un mensaje a: > lista-unsubscribe@phpes.com

« previous php.general.es (#16634) next »