Gracias tambien por avisame lo de la fecha, ya esta todo bien, pongo el codigo:
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"> <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" /> <script src="http://code.jquery.com/jquery-1.9.1.js"></script> <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> <link rel="stylesheet" href="/resources/demos/style.css" />
$(function() {
$( "#datepicker1" ).datepicker({ dateFormat: 'dd/mm/yy' });
$( "#datepicker2" ).datepicker({ dateFormat: 'dd/mm/yy' });
});
<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"> <p>fecha1:
<input type="text" id="datepicker1" name="fecha1"/></p> <p>fecha2:
<input type="text" id="datepicker2" name="fecha2"/></p> <input type="submit" value="Entrar">
en php:
Código PHP:
Ver original<?php
$id=$_POST["id"];
$nombre=$_POST["nombre"];
$sql="INSERT INTO tablaPrueba (id,nombre,fecha1,fecha2) VALUES ($id,'$nombre','$fecha1','$fecha2')";
?>