el codigo es el siguiente:
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)
<?php
$bd=mysql_connect("Localhost","estilo_carlos","mon cada") or die ("Error, No es posible conectarse a la base de datos");
mysql_select_db("estilo_mydb");
$opt=$_POST["opt"];
if ($opt==1)
{
$nombre=$HTTP_GET_VARS["nombre"];
$direccion=$HTTP_GET_VARS["direccion"];
$telefono=$HTTP_GET_VARS["telefono"];
$cedula=$HTTP_GET_VARS["cedula"];
$comentario=$HTTP_GET_VARS["comentario"];
$sql="insert into agenda(nombre, direccion, telefono, cedula, comentario) value ('".$nombre."','".$direccion."','".$telefono."','" .$cedula."','".$comentario."')";
$res=mysql_query($sql,$db) or die (mysql_error());
}
?>
<html>
<head>
<title>Contacto</title>
<style type="text/css">
<!--
.Estilo1 {
font-size: 36px;
font-style: italic;
font-weight: bold;
}
-->
</style>
</head>
<script language="javascript">
function verifica()
{
if (form1.cedula.value=="")
{
alert ("por favor ingrese su cedula");
return;
}
form1.opt.value=1;
form1.submit();
}
</script>
<body>
<p align="center" class="Estilo1">Contactanos</p>
<table width="579" height="416" border="1" align="center" bgcolor="#CCCCCC">
<tr>
<td width="569" height="410">
<form id="form1" name="form1" method="post" action="envioexitoso.html">
<input type="hidden" name="opt">
<div align="center">
<p><strong>Nombre y Apellido:
<input name="nombre" type="text" id="nombre" size="80" maxlength="150">
</strong></p>
</div>
</label>
<div align="center"><strong>
</strong></div>
<strong><label>
<div align="center">Direccion:
<input name="direccion" type="text" id="direccion" size="90" maxlength="200">
</div>
</label>
</strong>
<p align="center"><strong>
</strong><strong>
<label>
</label>
</strong>
<label><div align="left"><strong>
</strong>
<div align="justify"><strong>
<div align="right">Telefono
<input name="telefono" type="text" id="telefono" size="30" maxlength="15">
</div>
</strong></div>
</label>
<p align="right"><strong>
<label>Cedula
<input name="cedula" type="text" id="cedula" size="30" maxlength="8">
</label>
</strong></p>
<p align="center">
<strong>
<label>Comentario<br />
<textarea name="comentario" cols="80" rows="5" id="comentario"></textarea>
</label>
</strong> </p>
<p align="center">
<label>
<input type="submit" name="enviar" id="enviar" value="Enviar" onclick=verifica()>
</label>
</p>
</form>
<p>
</p></td>
</tr>
</table>
</body>
</html>