pero casi no le entiendo a php ayudenme aqui les dejo mi codigo haber si me dicen el error o me dan un codigo mas facil
se los agradecere mucho
<html>
<BODY BACKGROUND="fondo.JPG">
<?php
if ($enviar) {
$link = mysql_connect("localhost", "root");
mysql_select_db("hospital", $link);
$result = mysql_query("SELECT numexpediente FROM paciente WHERE numexpediente=numexpediente", $link);
if (mysql_num_rows($result)){
echo "<table border = '1'> \n";
echo "<tr><td>Nombre</td></tr> \n";
while ($row = @mysql_fetch_array($result)) {
echo "<tr><td>".$row["numexpediente"].
"</td><td>".$row["folio"]."</td></tr> \n";
}
echo "</table> \n";
}
else
echo "¡ No se ha encontrado ningún registro !";
?>
<tr>
<td align="center" height="79" width="476" colspan="1">
<div align="center">
<table border="0" cellpadding="2" cellspacing="2" width="400" height="122" BACKGROUND="camouflage.jpg">
<BR>
<TR>
<TD COLSPAN=2><center>
<H1>
<FONT COLOR="#FF0000"></FONT>
<FONT COLOR="#EF0000">Agregar</FONT>
<FONT COLOR="#DF0000"></FONT>
<FONT COLOR="#CF0000">Articulo</FONT>
<FONT COLOR="#BF0000"></FONT>
<FONT COLOR="#AF0000"></FONT>
<FONT COLOR="#9F0000"></FONT>
<FONT COLOR="#7F0000"></FONT>
</h1>
</center>
</TD>
</TR>
<TR>
<td>
<form method="post" action="RDAH1.php" >
<fieldset>
<legend><strong>Información del Producto</strong></legend>
<strong>Dame el folio</strong> :<input type="text" name="folio"><br>
<strong>Numero de expediente</strong>:           <input type="Text" name="numexpediente"><br>
<strong>Nombre </strong> :        <input type="Text" name="nombre"><br>
<strong>domicilio</strong> :        <input type="Text" name="domicilio"><br>
<br>
<strong>Servicio</strong>:        <input type="Text" name="servicio"><br>
<strong>Numero de cama</strong>:        <input type="Text" name="numcama"><br>
</fieldset>
<input type="Submit" name="enviar" value="Insertar información">
       <input type="reset" value="Limpiar texto">
</form> </td>
</tr>
<?php
} //end if
?>
</body>
</html>
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)