![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
22/12/2009, 03:50
|
| | Fecha de Ingreso: enero-2004 Ubicación: BARCELONA
Mensajes: 49
Antigüedad: 21 años Puntos: 0 | |
Respuesta: como escapar html todo el codigo es este
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
</head>
<body>
<?php
function Comprobar_Existe() {
$MAIL=trim($_GET['MAIL']);
$ConectaBD = mysql_connect("localhost", "root");
mysql_select_db("mydb", $ConectaBD);
$Consulta = "SELECT * FROM usuarios WHERE mail='$MAIL'";
$resEmp = mysql_query($Consulta, $ConectaBD) or die(mysql_error());
$totEmp = mysql_num_rows($resEmp);
if ($totEmp> 0) {
print("EXISTE");
$I=" EXISTE";
}
else
{
print("NO existe");
$I="NO EXISTE";
}
return $I;
}
mysql_free_result($Consulta);
mysql_close($ConectaBD);
?>
<table border="0" cellspacing="1" cellpadding="0">
<form action="form.php" method="GET">
<tr>
<td>Nombre:</td>
<td><input type="text" name="NOMBRE"></td><BR></tr>
<tr>
<td>E-mail:</td>
<td><?PHP echo"<input type="text" name="MAIL" onBlur=\"Comprobar_Existe()\" value=$MAIL >";?>
<BR> </td></tr>
<tr>
<td>Usuario:</td>
<td><input type="text" name="USUARIO"><BR>
</td</tr>
<td><input type="submit" name="BOTON" value="Enviar "></td>
</form>
</body>
</html> |