Here is the source for directorio.php
<?php
// Función para hacer una consulta e imprimirla formateada
function consulta ($nombre)
{
$directorio = "";
// Format string
$nombre = Trim($nombre);
$nombre = strtolower($nombre);
$nombre = ucfirst($nombre);
// include the apropiate file
if (!is_file($_SERVER['DOCUMENT_ROOT']."/directorio/db/" . $_POST['nombre'] .".txt"))
{
}
else
{
include_once($_SERVER['DOCUMENT_ROOT']."/directorio/db/" . $_POST['nombre'] .".txt");
}
// If Name exists in array print formated data
if (!is_array($directorio))
{
print("<B>" . $_POST['nombre'] . "</B> no está en la lista");
}
else
{
$datos_personales = $directorio[$nombre]['datos personales'];
$direccion = $directorio[$nombre]['direccion'];
$nombre = $datos_personales['Nombre'];
$apellido_paterno = $datos_personales['Apellido Paterno'];
$apellido_materno = $datos_personales['Apellido Materno'];
$edad_actual = $datos_personales['Edad'];
$calle = $direccion['Calle'];
$colonia = $direccion['Colonia'];
$cp = $direccion['C.P.'];
$telefono = $direccion['Teléfono'];
$ciudad = $direccion['Ciudad'];
$estado = $direccion['Estado'];
$pais = $direccion['PaÃs'];
// Array "Directorio"
print
(
"<H2>Información Personal</H2><BR>
<DIV ALIGN=LEFT><TABLE BORDER=0 WIDTH=\"500\">
<TR>
<TD width=\"80\" ALIGN=LEFT BGCOLOR=\"#A8A8F8\"><B> Nombre: </B></TD>
<TD ALIGN=LEFT BGCOLOR=\"#F0F8FF\"> $nombre $apellido_paterno $apellido_materno</TD>
</TR>
<TR>
<TD ALIGN=LEFT BGCOLOR=\"#A8A8F8\"><B> Edad: </B></TD>
<TD ALIGN=LEFT BGCOLOR=\"#F0F8FF\"> $edad_actual </TD>
</TR>
<TD ALIGN=LEFT BGCOLOR=\"#A8A8F8\"><B> Dirección: </B></TD>
<TD ALIGN=LEFT BGCOLOR=\"#F0F8FF\"> $calle, $colonia, C.P. $cp </TD>
</TR>
</TR>
<TD ALIGN=LEFT BGCOLOR=\"#A8A8F8\"><B> Cudad: </B></TD>
<TD ALIGN=LEFT BGCOLOR=\"#F0F8FF\"> $ciudad </TD>
</TR>
<TR>
<TD ALIGN=LEFT BGCOLOR=\"#A8A8F8\"><B> Estado: </B></TD>
<TD ALIGN=LEFT BGCOLOR=\"#F0F8FF\"> $estado </TD>
</TR>
<TR>
<TD ALIGN=LEFT BGCOLOR=\"#A8A8F8\"><B> PaÃs: </B></TD>
<TD ALIGN=LEFT BGCOLOR=\"#F0F8FF\"> $pais </TD>
</TR>
</TABLE></DIV><BR>"
);
}
}
?>
<HTML>
<HEAD>
<STYLE TYPE="text/css">
<!--
BODY, P, TD {color: black; font-family: verdana; font-size: 10pt}
H1 {color: blue; font-family: verdana; font-size: 20pt}
H2 {color: blue; font-family: verdana; font-size: 12pt}
-->
</STYLE>
<TITLE>Directorio</TITLE>
</HEAD>
<BODY>
<H1><CENTER>Directorio</CENTER></H1>
<BR>
<FORM ACTION="<?php $_SERVER['PHP_SELF']; ?>" METHOD="POST">
<DIV ALIGN=cENTER>
<P>A quién buscás, Imbécil?
<INPUT TYPE="text" SIZE=10 NAME="nombre">
<INPUT TYPE="submit" NAME="submit" VALUE="Ãmonos!">
</FORM>
</DIV>
<DIV ALIGN=left>
<BR>
<?php
if (!IsSet($_POST['nombre']))
{
print("<CENTER><IMG src=\" " . $_SERVER['DOCUMENT_ROOT'] . "/Renich.jpg\"></CENTER>");
}
else
{
consulta($_POST['nombre']);
}
print('<BR><BR>');
print('<A href="directorio_add.php">Agregar a alguien</a>');
?>
</BODY>
</HTML>
if you wanna help, go ahead, we need it
http://www.amba.org.mx