hola a todos, llevo ya bastante tiempo y no soy capaz de crear un sistema de login para mi pagina web, haber si alguien pudiera ayudarme, os paso los documentos que tengo y haber si alguien es capaz de mandarmelo adaptado a mi documento, ya que e buscado por internet bastantes sistemas de logueo pero soy incapaz de adaptarlo.
en la pestaña contactar tengo hecho el formulario para el logueo:
necesito que al loguearme me redireccione a otro link php que tengo que crear.
tambien un boton que pueda cerrar sesion.
gracias de antemano.
documento portada.php:
Código PHP:
Ver original<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF8">
<title>CASA DE PERROS</title>
<LINK REL
="stylesheet" TYPE
="text/css" HREF
="cssportada.css">
<script>
window.onload=function(){
document.getElementById("sitio").onclick=function (){mostrar(this);};
document.getElementById("conocenos").onclick=function (){mostrar(this);};
document.getElementById("Adopta").onclick=function (){mostrar(this);};
document.getElementById("abandona").onclick=function (){mostrar(this);};
}
function mostrar(menu){
objCaja=document.getElementById("caja");
switch (menu.id){
case "sitio":
break;
case "conocenos":
break;
case "Adopta":
break;
case "abandona":
objCaja.innerHTML = "<div id='texto3'><h2>¿NO PUEDE HACERSE CARGO DE SU PERRO?</h2></br></br></br>Para rellenar el formulario <a href='formularioperrospendiente.html'><u>PINCHA AQUÍ</u></a></br></br></div>";
objCaja.innerHTML +="<div id='login' align='right'></br><b>Iniciar Sesión</b></br></br><form name='formulario' action='entrar.php' method='post'>Username: <input type='text' placeholder='Correo electronico...' name='correo' id='texto'/></br></br>Password: <input type='text' placeholder='Clave de acceso...' name='clave' id='texto'/></br></br><input type='submit' value='Identificarme' /></form><\div>";
break;
default:
return false;
break;
}
}
</script>
</head>
<body>
<form>
<div id="titulo" style="font-size: 250%;"> CASA DE PERROS </div>
<br/><br/>
<div id="botones">
<input type="button" value="¿Dónde estámos? " id="sitio" class="Perrera" />
<input type="button" value="¿Quienes somos?" id="conocenos" class="Perrera" />
<input type="button" value="Adopta un perro" id="Adopta" class="Perrera" />
<input type="button" value="Contactar" id="abandona" class="Perrera" />
</div>
<div id="caja">
</div>
</form>
</body>
</html>
cssportada.css:
Código CSS:
Ver originalbody {
background: url(fondo6.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
a {
color: black;
text-decoration:none;
}
h1 {
color: black;
text-decoration: underline;
}
h3 {
TEXT-ALIGN:center;
color: black;
text-shadow: 5px 5px 5px #A4A4A4;
}
#titulo {
text-align: center;
text-shadow: 5px 5px 5px #585858;
width:340px;
margin: auto auto;
margin-top:30px;
padding-bottom:30px;
}
#caja {
display: block;
border-radius: 15px 15px 15px 15px;
border: solid black 3px;
width: 1207px;
height: auto;
margin: auto auto;
padding-left:12px;
padding-right:12px;
padding-bottom:30px;
background-color:#CED8F6;
}
#botones {
width: 1238px;
height: auto;
margin: auto auto;
}
.Perrera {
background-color: black;
color: white;
border-radius: 8px 8px 8px 8px;
width:200px;
height: 25px;
}
#mapa {
margin-left:600px;
margin-top:-300px;
margin-bottom:12px;
border-style: solid;
}
#imagen {
margin-left:600px;
margin-top:-300px;
margin-bottom:12px;
border-style: solid;
}
#texto {
position:left;
margin-left:70px;
margin-right:600px;
padding-right:12px;
}
#texto2 {
position:left;
margin-left:70px;
margin-right:600px;
padding-right:12px;
}
#texto3 {
position:left;
margin-left:70px;
margin-right:500px;
padding-right:12px;
}
#texto4 {
position:left;
margin-right:600px;
margin-left:70px;
padding-right:12px;
}
#texto5 {
margin-left:670px;
margin-top:-228px;
margin-bottom:12px;
width: 600px;
height: auto;
}
#col_der {
float: right;
width: 33%;
height: 190px;
padding-top:20px;
padding-bottom:20px;
background-color: white;
text-align: center;
margin:0 auto;
background-color:#CED8F6;
}
#col_izq {
float: left;
width: 33%;
height: 190px;
padding-top:20px;
padding-bottom:20px;
background-color: white;
text-align: center;
margin:0 auto;
background-color:#CED8F6;
}
#col_cen {
height: 190px;
padding-top:20px;
padding-bottom:20px;
background-color: white;
text-align: center;
margin:0 auto;
background-color:#CED8F6;
}
#col_der_texto1 {
float: right;
width: 33%;
height: auto;
background-color:#CED8F6;
}
#col_izq_texto2 {
float: left;
width: 33%;
height: auto;
background-color:#CED8F6;
}
#col_cen_texto3 {
height: auto;
background-color:#CED8F6;
}
#imgpequenio {
border-style: solid;
border-color: black;
}
#imgmediano {
border-style: solid;
border-color: black;
}
#imggrande {
border-style: solid;
border-color: black;
}
#todos_los_perros_texto {
text-align: center;
}
#todos_los_perros {
border-style: solid;
margin: auto auto;
width:1000px;
}
#login{
display: block;
background-color: #FFFFFF;
margin-left:850px;
margin-top:-200px;
margin-bottom:12px;
width:340px;
height: 190px;
border-radius: 15px 15px 15px 15px;
border: solid black 1px;
TEXT-ALIGN:center;
}
la base de datos: