hola foro, tengo el siguiente codigo que la idea
es que al pulsar el boton haga algo(llamar a una funcion)
para poder validar que se pulso el boton, pero ni la funcion
onclick=funcion() se va a la funcion ni tampoco me valida con el
if $_post["var"]
aqui el codigo, espero alguien me pueda apoyar con esto
Código PHP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"[url]http://www.w3.org/TR/html4/loose.dtd[/url]">
<html>
<head>
<title>ejemplo de formulario</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?PHP
function verifica()
{
echo "si entre";
echo $mail;
}
?>
<table width="505" border="1">
<tr>
<td width="80">nombre</td>
<td width="333"><form name="form2" method="post" action="">
<input name="nombre" type="text" id="nombre" value="" size="55" maxlength="50">
</form></td>
<td width="28"> </td>
</tr>
<tr>
<td>email</td>
<td><form name="form3" method="post" action="">
<input name="email" type="text" id="email" size="55" maxlength="50">
</form></td>
<td><form name="form1" method="post" action="">
<input type="submit" name="enviar" ) id="var" value="Enviar" onclick=verifica() >
</form>
</table>
<td> </td>
<td> </td>
<?PHP
if ($_POST["var"])
{
echo "si valido el post";
}
?>
</p>
</body>
</html>