Ver Mensaje Individual
  #8 (permalink)  
Antiguo 01/08/2008, 13:14
Avatar de KaLa_zIcK
KaLa_zIcK
 
Fecha de Ingreso: junio-2008
Mensajes: 21
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: validar login y password

este es mi codigo de izquierda.html

<?php
session_start();
session_destroy();
?>
<html>
<head>
<title>Ménu </title>
</head>
<script>
function Fecha()
{
B=new Date();
d=B.getDate();
m=B.getMonth();
a=B.getYear();
if(m<10){m="0"+m}
if(d<10){d="0"+d}
document.b1.uno.value= d+"/"+m+"/"+a;
}

function Hora(){
Y=new Date();
h=Y.getHours();
mi=Y.getMinutes();
s=Y.getSeconds();
if(mi<10){mi="0"+mi}
if(s<10){s="0"+s}
document.b1.dos.value=h+":"+mi+":"+s
i=setTimeout("Hora()",1000)
Fecha();
}

function arriba(a,b)
{
a.src=b
}

function pass_usu()
{
c=event.keyCode
if( (c>=48 && c<=57) || (c>=65 && c<=90) || (c>=97 && c<=122))
{
return true
}
return false
}

</script>

<body background="fondo5.jpg" onload="Hora()" method=post action="verificapass.php">
<form name=b1>
<input type=text name="uno" size=10>
<input type=text name="dos" size=10>
<hr>
<a href="inicio.html" target="f3"><img src="inicio1.jpg"onmouseover="arriba(this, 'inicio2.jpg')" onmouseout="arriba(this, 'inicio1.jpg')" width=160 height=30 name=i1></a><br>
<br>
<a href="historia.html" target="f3"><img src="historia1.jpg"onmouseover="arriba(this, 'historia2.jpg')" onmouseout="arriba(this, 'historia1.jpg')" width=160 height=30 name=i2></a><br>

<hr>
<a href="menu productos.html" target="f3"> <img src="productos1.jpg"onmouseover="arriba(this, 'productos2.jpg')" onmouseout="arriba(this, 'productos1.jpg')" width=160 height=30 name=i7></a>

<hr>
<a href="registro.html" target="f3"><img src="registro1.jpg"onmouseover="arriba(this, 'registro2.jpg')" onmouseout="arriba(this, 'registro1.jpg')" width=160 height=30 name=i1></h6></a>
<font color=red>Usuario<br></font>

<input type=text name="txtnom" value="" onkeypress="return pass_usu()" Maxlength="8"><br>
<font color=red>Password<br></font>
<input type=password name="txtpass" value="" Maxlength="8" onkeypress="return pass_usu()"><br>
<br><input type=submit name="btnentra" value="entrar" >
<a href="terminos.html" target="blank"><font color=red><h6>Terminos y Condiciones</h6></font></a>
<hr>
<a href="somos.html"target="f3" ><img src="somos1.jpg"onmouseover="arriba(this, 'somos2.jpg')" onmouseout="arriba(this, 'somos1.jpg')" width=160 height=30 name=i3><br></a>
<br>
<a href="politicas.html" target="f3"><img src="calidad1.jpg"onmouseover="arriba(this, 'calidad2.jpg')" onmouseout="arriba(this, 'calidad1.jpg')" width=160 height=30 name=i4><br></a>
<hr>
<img src="encuentranos1.jpg"onmouseover="arriba(this, 'encuentranos2.jpg')" onmouseout="arriba(this, 'encuentranos1.jpg')" width=160 height=30 name=i5>
<br>
<a href="contacto.html" target="f3"> <img src="contacto1.jpg"onmouseover="arriba(this, 'contacto2.jpg')" onmouseout="arriba(this, 'contacto1.jpg')" width=160 height=30 name=i6></a>
<hr>
</form>
</body>
</html>

y este es el codigo de verificapass.php

<?php
session_start();
$lo=$_POST["txtusu"];
$pas=$_POST["txtpass"];
$con=mysql_connect("localhost","root","");
$bd=mysql_select_db("tienda_plas");
$qry=mysql_query("select * from usuario where nom_usu='$lo' and pass='$pas' ");
echo ("select * from usuario where nom_usu='" . $lo . "' and pass='" . $pas . "'" );
echo $lo;
header("location:menu.html");
header("location:catalogo.php".SID);
?>

en este eh estado intentando todas las cosas que me han dicho pero sigue sin direccionar a nada lo que es menu.html que tengo dividido en tre frame espero y me puedan ayudar gracias