Hola, tengo un formulario que al apretar el botón espero ejecute código de otro php donde simplemente cuenta y pone tres unos; es muy sencillo y soy principiante, me podrían decir que me falto? Gracias
El formulario:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
//include_once("ciclo1.php");
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="ciclo1.php">
<label>
<input type="button" name="boton" id="boton" value="Enviar" onclick="contar();" />
</label>
</form>
</body>
</html>
El php ciclo1
<?php
function contar(){
$i=1;
$contador=0;
do{
echo"$i";
$contador+=1;
if($contador==3){
$i=0;
}
}while($i==1);
}
?>