Ver Mensaje Individual
  #1 (permalink)  
Antiguo 25/03/2011, 10:57
Geovanny0401
 
Fecha de Ingreso: diciembre-2009
Mensajes: 137
Antigüedad: 14 años, 4 meses
Puntos: 4
Pregunta Probelam al conectar a bd

cordial saludo


amigos del foro tengo el siguiente problema, soy principiante en php y estoy tratando de conectarme a una bd en mysql, como servidor tengo IIS, base de datos mysql y php.

aca tengo el codigo
Código PHP:
<html>
<head>

<?php

$servidor
='localhost';
$usuario='root';
$clave='root';
 
$conexion mysql_connect($servidor,$usuario,$clave);
//$conexion = mysql_connect("localhost","root","root");
mysql_select_db("rslapaz",$conexion);
$query "SELECT * FROM GLOTIPOS";
$resul mysql_query($query$conexion) or die(mysql_error());
$total mysql_num_rows($resul);



?>

<meta http-equiv="Content-Type" content="text/html;"/>
<title>Conexion a Mysql</title>
</head>

<body>
<h1>Resultado</h1>
<?php

if($total>0)
{
 while(
$fila mysql_fetch_assoc($resul))
 {
    echo 
"<strong>".$fila['TIPCODIGO']."</strong><br/>";
    echo 
"SUBTIPO: ".$fila['TIPSUBTIPO']."<br>";
    echo 
"NOMBRE: ".$fila['TIPNOMBRE']."<br>";
    echo 
"NOMBRE: ".$fila['TIPESTADO']."<br><br>";
    
    
 }
}

?>

</head>
</html>
me genera un error y no me muestra nada la pagina, necesito su ayuda para ver donde tengo el error