Ver Mensaje Individual
  #2 (permalink)  
Antiguo 16/03/2009, 07:30
Avatar de farra
farra
 
Fecha de Ingreso: marzo-2008
Ubicación: Aqui estoy
Mensajes: 574
Antigüedad: 16 años, 11 meses
Puntos: 20
Respuesta: Necesito hacer una consulta

Tendria que ser algo asi:
Código PHP:
<?php require_once('conexion.php'); ?>
<?php
mysql_select_db
($database_conexion$conexion);
$ip=$_GET['ip'];
$query_ips "SELECT ip FROM tablaip where ip = '$ip'";
$ips mysql_query($query_ips$conexion) or die(mysql_error());
$row_ips mysql_fetch_assoc($ips);
$totalRows_ips mysql_num_rows($ips);
?><!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 if(trim($row_ips['ip']) != ""){ echo $row_ips['ip']; } else{ echo "La IP no esta en la BD."; }?>
</body>
</html>
<?php
mysql_free_result
($ips);
?>
__________________
Firma:
Es mas dificil para el mono entender que el hombre desciende de el....

PD: Siempre doy karma al que me da una buena respuesta... ;0)