Código PHP:
<?
//recojo las variables que vienen de otra página
$id=$HTTP_POST_VARS[id];
$fe=$HTTP_POST_VARS[fecha];
$ref=$HTTP_POST_VARS[referencia];
$n=$HTTP_POST_VARS[nombre];
$ap1=$HTTP_POST_VARS[apellido1];
$ap2=$HTTP_POST_VARS[apellido2];
$di=$HTTP_POST_VARS[direccion];
$t=$HTTP_POST_VARS[telefono];
$em=$HTTP_POST_VARS[email];
$des=$HTTP_POST_VARS[descripcion];
//conecto con la base de datos
include("conectobd.php");
// hago la actualización
$sql = "UPDATE clientes SET fecha='$fe', referencia='$ref', nombre='$n', apellido1='$ap1', apellido2='$ap2', telefono='$te', email='$em', direccion='$di' WHERE id='$id'";
$result = mysql_query($sql) ;
?>
//uso el formulario de abajo para mostrar a la vez los datos que se
//actualizaron
<body>
<table width="648" align="center" cellpadding="0" cellspacing="0" bgcolor="#A6D9FF">
<tr>
<td><table align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="../Images/logotipo2/logotipo_01.gif" width="297" height="45"></td>
<td><img src="../Images/logotipo2/logotipo_02.gif" width="333" height="45"></td>
</tr>
<tr>
<td><img src="../Images/logotipo2/logotipo_03.gif" width="297" height="52"></td>
<td><img src="../Images/logotipo2/logotipo_04.gif" width="333" height="52"></td>
</tr>
</table></td>
</tr>
</table>
<table width="648" align="center" cellpadding="0" cellspacing="0" bgcolor="#A6D9FF">
<tr>
<td><form name="form1" method="post" action="">
<table width="648" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="16%">Código cliente </td>
<td width="6%"><input name="codigo_cliente" type="text" id="codigo_cliente" size="3" maxlength="5" value="<? echo $id ;?> "></td>
<td width="17%"><div align="right">Nombre </div></td>
<td width="24%"><div align="right">
<input name="nombre" type="text" id="nombre" value="<? echo $n ; ?> ">
</div></td>
<td width="11%"> </td>
<td width="7%">Fecha</td>
<td width="19%"><input name="fecha" type="text" id="fecha" size="10" maxlength="10" value="<? echo $fe;?>"></td>
</tr>
</table>
<br>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="17%">Ref. Inmueble </td>
<td width="9%"><input name="referencia" type="text" id="referencia" value="<? echo $ref; ?> " size="8" maxlength="10"></td>
<td width="1%"> </td>
<td width="13%"><div align="right">Apellidos</div></td>
<td width="25%"><input name="apellido1" type="text" id="apellido1" value="<? echo $ap1; ?> "></td>
<td width="35%"><input name="apellido2" type="text" id="apellido2" value="<? echo $ap2; ?> "></td>
</tr>
</table></td></tr>
<tr>
<td><table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="34%"><div align="right">Teléfono</div></td>
<td width="33%"><input name="telefono" type="text" id="telefono" size="10" maxlength="12" value="<? echo $t; ?> "></td>
<td width="33%"><div align="right">Dirección</div></td>
<td width="66%"><input name="direccion" type="text" id="direccion" size="40" value="<? echo $di; ?> "></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="17%">Datos Inmueble</td>
<td width="7%"> </td>
<td width="28%"><div align="right">E-mail </div></td>
<td width="24%"><div align="center">
<input name="email" type="text" id="email" value="<? echo $em; ?> ">
</div></td>
<td width="8%"><input name="Email" type="submit" id="Email" value="Email" action="mailto:[email protected]" >
</td>
<td width="16%"><div align="center"><span class="Estilo1">(enviar email)</span></div></td>
</tr>
</table></td>
</tr>
<tr>
<td><table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">
<textarea name="descripcion" cols="75" rows="15" id="descripcion" ><? echo $des;?></textarea>
</div></td>
</tr>
</table></td>
</tr>
<tr>
<td><input name=idclose type=button value="Cerrar" onclick="window.close()" style="border: 1px solid #000080">
<input type="submit" name="Submit" value="BORRAR">
DATOS ACTUALIZADOS </td>
</tr>
</table>
</form></td>
</tr>
</table>
<p> </p>
<p> </p>
</body>
</html>