PHP - El codigo PHP no se ejecuta

 
Vista:
sin imagen de perfil

El codigo PHP no se ejecuta

Publicado por Naïm (1 intervención) el 24/11/2017 20:33:23
Hola buenas noches
Estoy haciendo un ejercicio el qual consiste en crear un formulario con html5 y php, la seccion de html5 no me da ningun error, el problema viene al ejecutar el php, es como si no me lo reconociera, yo creo que son las Id de las etiquetas, pero por lo que pareze esta todo en orden.
Gracias por su atencion ^^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sin título</title>
<style>
	h1{
		text-align:center;
	}
 
	table{
		background-color:#FFC;
		padding:5px;
		border:#666 5px solid;
	}
 
	.no_validado{
		font-size:18px;
		color:#F00;
		font-weight:bold;
	}
 
	.validado{
		font-size:18px;
		color:#0C3;
		font-weight:bold;
	}
 
 
</style>
</head>
 
<body>
<h1>EJEMPLO DE FORMULARIO</h1>
 
<form action="file:///C|/wamp64/www/validacion.php" method="post" name="datos_usuario" id="datos_usuario">
  <table width="15%" align="center">
    <tr>
      <td>Nombre:</td>
      <td><label for="nombre_usuario"></label>
      <input type="text" name="nombre_usuario" id="nombre_usuario"></td>
    </tr>
    <tr>
      <td>Edad:</td>
      <td><label for="edad_usuario"></label>
      <input type="text" name="edad_usuario" id="edad_usuario"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" name="enviando" id="enviando" value="Enviar"></td>
    </tr>
  </table>
</form>
 
	<?php
 
	   if(isset($_POST["enviando"])){
 
		   $usuario=$_POST["nombre_usuario"];
		   $edad=$_POST["edad_usuario"];
 
		   if($usuario=="Juan"){
 
			   echo "Puedes entrar";
 
 
		   }else{
 
			   echo "No puedes entrar";
		   }
 
	   }
 
 
 
 
	?>
 
 
 
</body>
</html>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder