Diferencia entre revisiones de «Programación en PHP/Intermedio/Regexp»

Contenido eliminado Contenido añadido
Bathorz (discusión | contribs.)
Sin resumen de edición
Bathorz (discusión | contribs.)
Deshecha la revisión 230977 de Bathorz (disc.)
Línea 1:
<source lang="php">
<?php
header('Content-type: text/html; charset=utf-8');
 
if (isset($_POST['muestra'])) {
echo 'Holahola, ' . htmlentities($_POST['nombre'])
. '&nbsp;, tu animal favorito es:&nbsp;' . htmlentities($_POST['animal']);
}
else {
?>
$html = '<form method="post" action="' . $_SERVER['PHP_SELF'] . '" >
<from method="post" action="?">
¿Cuál es tu nombre?
¿cual es tu nombre?
<input type="text" name="nombre" />
¿Cuálcual es tu animal favorito?
<select name="animal">
<option>perro</option>
<option>gato</option>
<option>ave</option>
</select>
<input type="submit" name="muestra" value="Siguiente" />
</form>';
<?php
echo $html;
}
?>
</source>