tengo este codigo en html:
Código HTML:
Ver original
<!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=utf-8" /> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> <link rel="stylesheet" href="/resources/demos/style.css" /> <script> $(function() { $( "#datepicker1" ).datepicker(); $( "#datepicker2" ).datepicker(); }); </script> </head> <body> <form action="ingresar.php" method="post"> Escribe tu id: <input type="text" name="id" size="2"> Escribe tu nombre: <input type="text" name="nombre" size="10"> <input type="submit" value="Entrar"> </form> </body> </html>
y tengo este en ingresar.php:
Código PHP:
Ver original
<?php $id=$_POST["id"]; $nombre=$_POST["nombre"]; $fecha1=$_POST["fecha1"]; $fecha2=$_POST["fecha2"]; $sql="INSERT INTO tablaPrueba (id,nombre,fecha1,fecha2) VALUES ($id,$nombre,$fecha1,$fecha2)"; ?>
el preblema que cuando le doy en entrar, me muestra toda la sintaxis del php sin guardar los datos
Gracias por la ayuda