PHP - problemas con mensaje de alerta en if

 
Vista:
sin imagen de perfil

problemas con mensaje de alerta en if

Publicado por DIEGO (1 intervención) el 14/03/2016 21:38:38
buenas tardes para todos, la presente es para pedirles ayuda con el una alerta que no me funciona,

tengo dos archivos .php

1 formularioBusqueda.php: que busca u documento
2 tabla.php: que muestra lo encontrado

lo que necesito es que cuando no encuentre nada me arroje un mensaje de alerta

relaciono los codigos.

1.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
</head>
<body>
<form action = "tabla.php" method="GET">
<div id='cssmenu'>
<ul>
   <li><a href="index.php">Menu</a></li>
   <li><a href='FormularioBusqueda.php'>Buscar Asociado</a></li>
   <li><a href="formulario.php">Inscribir Asociado</a></li>
   <li><a href='Formularioexportar.php'>Descargar Club De Vida</a></li>
    <li><a href='descargaregresados.php'>Descargar Socios Egresados</a></li>
   <DIV align="right">
	<font color="White"> <P>Bienvenido:  <input type="text"  style="background-color:transparent; border: none; color:White;" readonly=”readonly” name="USER" value= <?php echo $_SESSION['USER']; ?>>
</font>
	</DIV>
</ul>
</div>
<h1>Buscar Asociado</h1>
<div>
<input type	="text" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;" name="DOCUMENTO"/>
<input type	="submit" class="styled-button-8" value="Buscar"/>
</div>
</form>
</body>
</html>

2.

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
<?php
header('Content-Type: text/html; charset=ISO-8859-1');
?>
<body>
<div id='cssmenu'>
<ul>
   <li><a href="index.php">Menu</a></li>
   <li><a href='FormularioBusqueda.php'>Buscar Asociado</a></li>
   <li><a href="formulario.php">Inscribir Asociado</a></li>
   <li><a href='Formularioexportar.php'>Descargar Club De Vida</a></li>
   <li><a href='descargaregresados.php'>Descargar Socios Egresados</a></li>
   <DIV align="right">
	<font color="White"> <P>Bienvenido:  <input type="text"  style="background-color:transparent; border: none; color:White;" readonly=”readonly” name="USER" value= <?php echo $_SESSION['USER']; ?>>
</font>
	</DIV>
</ul>
</div>
<br/><br/><br/>
	<center>
 
		<?php
			include("conexion.php");
			 $DOCUMENTO = $_GET ['DOCUMENTO'];
			$query= "SELECT * FROM usuarios WHERE DOCUMENTO = '$DOCUMENTO'";
			$resultado = $conexion->query($query);
 
			while($row=$resultado->fetch_assoc()){
 
		?>
			<tr>
 
	<tt>
				<td><?php echo $row ['DOCUMENTO'];?></td>
				<td><?php
 
 
	echo $row ['NOMBRE1'];
 
	?></td>
				<td><?php echo $row ['NOMBRE2'];?></td>
				<td><?php echo $row ['APELLIDO1'];?></td>
				<td><?php echo $row ['APELLIDO2'];?></td>
				</tt>
				<br/><br/>
				<td><a href = "modificar.php?ID=<?php echo $row ['ID'];?>"><input type="button" class="styled-button-8" value="Consultar"></a></td>&nbsp &nbsp &nbsp
				<td><a href = "egresar.php?ID=<?php echo $row ['ID'];?>"><input type="button" class="styled-button-9" value="Egresar"></a></td></a></td>
			</tr>
 
		<?php
 
 
		}
			if($row==['DOCUMENTO']){
		echo "no lo encontro";
 
		}
	else {
		}
		?>
 
	</center>
</body>
</html>


Muchas Gracias
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