<?php
function Conectarse()
{
if (!($link=mysql_connect("localhost","root","")))
{
echo "Error conectando a la base de datos.";
exit();
}
if (!mysql_select_db("clinica",$link))
{
echo "Error seleccionando la base de datos.";
exit();
}
return $link;
}
$link=Conectarse();
echo "<font color=#ffffff >Conexión con la base de datos conseguida.<br></font>";
//mysql_close($link); //cierra la conexion
?>
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1 align="center"><font color="#2C7AA9" size="-1" face="Arial, Helvetica, sans-serif"><strong>Buscar Historial Clinico</strong></font></h1>
<form action="historia" method="post" target="_parent">
<p align="center"> <font color="#2C7AA9" size="-1" face="Arial, Helvetica, sans-serif">
<strong>Seleccione paciente:</strong></font>
<?php
//include ('conectarse.php');
$resultado=mysql_query("select concat(P_apellidop,' ', P_apellidom,' ', P_nombre) as Nombre from paciente");
//echo "Valor de seleccion:". $_POST["claves"]."<br>";
$llevar=mysql_query("select p_cedula from paciente");
echo "<SELECT NAME='claves' SIZE='1' onchange='this.form.submit();'>";
while ($row = mysql_fetch_row($resultado))
{
echo "<OPTION VALUE='$row[0]'>$row[0] </OPTION>";
}
echo "</SELECT> ";
?>
<p align="center">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" onclick="mensaje()" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="100" height="20">
<param name="movie" value="bus_exa.swf">
<param name="quality" value="high">
<param name="base" value=".">
<embed src="bus_exa.swf" base="." quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="100" height="20" ></embed>
</object>
<p align="center">
<p align="center"> </p>
<p align="left"></p>
</form>
</body>
</html>