tengo el siguiente codigo
Código HTML:
<html>
<head>
<title>Ejemplo de PHP</title>
</head>
<body>
<H1>!!!!!Introduce el numero de control del alumno que desea buscar.!!</H1>
<FORM ACTION="verp.php" method="get">
<p>numero De Control:
<input type="text" name="control" class="flat" size="8" maxlength="8">
<input type="submit" name="accion" value="Buscar">
</p>
<p> </p>
</FORM>
</body>
</html>
Código PHP:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body background="/prue/IMAGENES/green.jpg">
<?
$numcon=substr("$control",1,-5);
if ($numcon<="0")
{
?><h1>
<p><font color="#FFFFFF"> Introduse bien el numero de control a buscar </font></p>
<p><font color="#FFFFFF">: </font>
<?
}
else
{
include("conec.php");
$link=Conectarse();
$cons = "SELECT * FROM datos,medico,tutorias,comentarios Where datos.id=medico.id and datos.id=tutorias.id and datos.id=comentarios.id';";
$resultado = mysql_query($cons,$link);
$Num_filas = mysql_num_rows($resultado);
if ($Num_filas >= 1):?><TABLE width="175" BORDER=10 bgcolor="#CCCCCC">
<TR>
<th height="23" >Numero De control</th>
<th >Nombre</th>
<th >Apellido Paterno</th>
<th>Apellido Materno</th>
<th>Nombre Univercidad</th>
<th>Carrera Tecnica</th>
<th>Cuatrimestre</th>
<th>Lada</th>
<td>telefono</td>
<td>Correo Electronico</td>
</TR>
<?php
while($row = mysql_fetch_array($resultado))
{
printf("<tr>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
<td>%s</td>
</tr>
",$row["Id_control"],$row["nombre"],$row["apellidop"],$row["apellidom"],$row["nombreuni"],$row["nombrecarrera"],$row["cuatrimestre"],$row["lada"],$row["telefono"],$row["escribe"]);}
?>
</font>
<p> </p>
<h1> </h1>
<h1> </h1>
<p> </p>
<p> </p>
<?
else:
?>
<p> </p>
<p><font color="#FFFFFF" size="6"><strong><em>REGISTRO NO ENCONTRADO</em></strong></font></p>
<p> </p><p>
</p>
<p> <br>
</p>
<p> </p>
<p>
<?
endif;
mysql_free_result($resultado);
}
?>
</p>
</p>
<p> </p>
<p>
bueno en si no se como hacerle para que la consulta sea una consulta especifica...si
alguien me puede decir..o mandarme algun link
...saludos. y que esten bien
.