
15/09/2010, 10:08
|
 | | | Fecha de Ingreso: agosto-2006 Ubicación: Estado de Mexico
Mensajes: 25
Antigüedad: 18 años, 6 meses Puntos: 1 | |
Respuesta: Ayuda con formulario Saludos amigo pues creo que practicamente lo que necesitas no es nada ya lo tienes todo ahi solo un formulario en HTML envia los datos y listo ya en tu PHP los recoges por el metodo POST asi: formulario.html Código HTML: <!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" />
<title>Formulario</title>
<link rel="stylesheet" type="text/css" href="estilos.css" />
</head>
<body>
<form name="formulario" action="acciones.php" class="form" method="POST">
<p>Valor1: <input type="text" name="valor1" /></p>
<p>Valor2: <input type="text" name="valor2" /></p>
<p>Valor3: <input type="text" name="valor3" /></p>
<p class="btn"><input type="submit" name="Enviar" value="Enviar" class="btn" /></p>
</form>
</body>
</html>
tu archivo que ya tienes .php solo modificado ligeramente asi: acciones.php Código PHP: <? function isJewishLeapYear($year) { if ($year % 19 == 0 || $year % 19 == 3 || $year % 19 == 6 || $year % 19 == 8 || $year % 19 == 11 || $year % 19 == 14 || $year % 19 == 17) return true; else return false; }
function getJewishMonthName($jewishMonth, $jewishYear) { $jewishMonthNamesLeap = array("Tishri", "Heshvan", "Kislev", "Tevet", "Shevat", "Adar I", "Adar II", "Nisan", "Iyar", "Sivan", "Tammuz", "Av", "Elul"); $jewishMonthNamesNonLeap = array("Tishri", "Heshvan", "Kislev", "Tevet", "Shevat", "Adar", "", "Nisan", "Iyar", "Sivan", "Tammuz", "Av", "Elul"); if (isJewishLeapYear($jewishYear)) return $jewishMonthNamesLeap[$jewishMonth-1]; else return $jewishMonthNamesNonLeap[$jewishMonth-1]; }
$jdNumber = gregoriantojd($_REQUEST['valor1'], $_REQUEST['valor2'], $_REQUEST['valor3']); $jewishDate = jdtojewish($jdNumber); list($jewishMonth, $jewishDay, $jewishYear) = split('/', $jewishDate); $jewishMonthName = getJewishMonthName($jewishMonth, $jewishYear); echo "<p>The 21 May 1993 is the $jewishDay $jewishMonthName $jewishYear</p>\n"; ?>
el Extra del estilo del Fiormulario estilos.css Código HTML: body{
font-family: Verdana;
font-size: 12px;
}
.form{
border: 1px dotted #E0E4E9;
background: #F2F5F7;
width: 300px;
margin: 0 auto;
padding: 10px;
}
input{
width: 200px;
padding: 8px;
border: 1px solid #DCE1E4;
background: #EDF0F1;
}
input.btn{
border: 1px solid #D8D8D8;
width: 80px;
background: #FFFFFF;
}
p.btn{
text-align: right;
padding-right: 30px;
}
un saludos desde Mexico
Última edición por GatorV; 15/09/2010 a las 10:21 |