Procesar varios formularios
Publicado por Juan (8 intervenciones) el 27/07/2007 21:38:37
Saludos... estoy aprendiendo php y quisiera sabr algo, como puedo procesa varios formularios con una misma funcion php, para ponerlo mas simple imaginen que tengo 3 formularios html cada uno con un campo de texto y un boton, al presionar el boton de uno de los formularios deseo que una funcion php me muestre lo que ingrese en el campo de texto de ese formulario.... tengo lo siguiente:
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
function Imprimir($texto,$proc)
{
if(isset($proc))
{
print("Usted Ingreso: $texto <br/>");
}
else
{
print("un coño e madre");
}
}
?>
<form action="formulario_1.php" method="post">
<input type="text" name="Texto1">
<input type="submit" name="proc1" onClick="//llamado a la funcion php">
</form>
<form action="formulario_1.php" method="post">
<input type="text" name="Texto2">
<input type="submit" name="proc2" onClick=" //llamado a la funcion php">
</form>
<form action="formulario_1.php" method="post">
<input type="text" name="Texto3">
<input type="submit" name="proc3" onClick= "//llamado a la funcion php">
</form>
</body>
</html>
el asunto es que no se como hacer para que mi funcion php "imprimir" me procese lo que le envio en el formulario, ayuda por favor
<html>
<head>
<title>Documento sin título</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?php
function Imprimir($texto,$proc)
{
if(isset($proc))
{
print("Usted Ingreso: $texto <br/>");
}
else
{
print("un coño e madre");
}
}
?>
<form action="formulario_1.php" method="post">
<input type="text" name="Texto1">
<input type="submit" name="proc1" onClick="//llamado a la funcion php">
</form>
<form action="formulario_1.php" method="post">
<input type="text" name="Texto2">
<input type="submit" name="proc2" onClick=" //llamado a la funcion php">
</form>
<form action="formulario_1.php" method="post">
<input type="text" name="Texto3">
<input type="submit" name="proc3" onClick= "//llamado a la funcion php">
</form>
</body>
</html>
el asunto es que no se como hacer para que mi funcion php "imprimir" me procese lo que le envio en el formulario, ayuda por favor
Valora esta pregunta


0