Muchas gracias cala932, pero me sigue sin introducir los datos
El archivo del formulario lo he dejado así:
Código:
<html>
<head>
<title>Ejemplo de PHP</title>
</head>
<body>
<H1>Ejemplo de uso de bases de datos con PHP y MySQL</H1>
<FORM ACTION="procesar.phtml" METHOD="GET">
Introduzca su nombre:<INPUT TYPE="text" NAME="nombre"><BR>
Introduzca sus apellidos:<INPUT TYPE="text" NAME="apellidos"><BR>
<INPUT TYPE="submit" VALUE="Enviar">
</FORM>
<?php
include("conex.phtml");
$link=Conectarse();
$result=mysql_query("select * from prueba",$link);
?>
<TABLE BORDER=1 CELLSPACING=1 CELLPADDING=1>
<TR><TD> <B>Nombre</B></TD> <TD> <B>Apellidos</B> </TD></TR>
<?php
while($row = mysql_fetch_array($result)) {
printf("<tr><td> %s</td> <td> %s </td></tr>", $row["nombre"], $row["apellidos"]);
}
mysql_free_result($result);
mysql_close($link);
?>
</table>
</body>
</html>
¿Podría estar el problema en la tabla?