Buenas a tod@s:
Tengo un formulario en el archivo index.php y estoy llamando a un archivo php para validar los campos del formulario, el problema es que al regresar a index pierdo los datos del formulario. Para solucionar el problema he visto que se puede hacer:
<input name="name" type="text" value="<?php echo $name; ?>" />
pero no logro que funcione. Podeis decirme como solucionarlo o se os ocurre otra forma de recuperar los datos.
Mi código fuente es este:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<div id="Layer2">
<form name="frmRegistro" method="post" action="FuncionesSQL.php">
<table width="960" border="0">
<tr>
<td colspan="2">Nombre</td>
<td width="480">Apellidos</td>
</tr>
<tr>
<td colspan="2"><input name="name" type="text" value="<?php echo $name; ?>" size="50"/></td>
<td width="480"><input name="surnames" type="text" id="surnames" size="50" /></td>
</tr>
</table>
<input name="Aceptar" type="submit" id="Aceptar" value="Aceptar" style="position:absolute; right:500px; top:433px;"/>
<input name="Cancelar" type="button" id="Cancelar" value="Cancelar" style="position:absolute; right:400px; top:433px;" />
</form>
</div>
</body>
</html>