Vale e aqui mi decimoquinto problema....cuando click en boton de inisciar sesion no me redirije a la pagina desada: dejo el codigo, empiezo a estar un poco desesperado:
aqui es donde esta el boton (<br/><input type="submit" name="aceptar" id="aceptar" value="Continuar" onClick=" window.location.href='administrar.php' "/> <li>)
Código HTML:
Ver original
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> body {
font-style:italic;
margin: 0 auto;
font-family: arial;
text-align:center;
background-color: #F0F0F0;
vertical-align:center;
background-image:url(fondo-cabecera.png);
background-repeat:repeat-x;
}
#cabecera{
background-color:#000;
background-repeat:repeat;
margin-top:40px;
margin-bottom:60px
}
#tabla1{
font-weight: bold;
color: #F0F0F0;
height:auto;
width:auto;
overflow: hidden;
class="fija";
font-family: Arial;
font-size: 20px;
font-style: normal;
line-height: normal;
text-transform: capitalize;
margin-top:120 px;
}
#general{
width:960px;
margin-top:60px;
margin-left:225px;
}
p {
font-family: Arial;
font-size: 12px;
font-weight:normal;
}
#barra{
background-repeat:repeat;
background-image: url(BARRA-INFERIOR.jpg);
margin-top:20px;
}
#link{
margin-top:345px;
font-family:arial;
font-size:14px;
font-weight:bold;
}
<div id="logoied" align="right"><img src="logo-izq.png" width="127" height="25" alt="buscar" align="left" /> <img src="logo-ied2.png" width="70" height="32" alt="buscar" />
<div id="" align="center"> <p>introduce tus datos
</p>
<form name="form_logeo" id="form_logeo" method="post" action="login.php">
<td><input type="text" name="email" id="email" maxlength="80" size="15" /></td> <td>Contrase
ña:
</td> <input type="password" name="password" id="password" maxlength="15" size="15" />
<input type="hidden" name="aceptar" value="1" /> <tr><td align="center" colspan="2"><br/><input type="submit" name="aceptar" id="aceptar" value="Continuar" onClick=" window.location.href='administrar.php' "/> <li><a href="administrar.php">Principal
</a></li>
<a href="mostrar.php">Volver
</a></div>
<img src="BARRA-INFERIOR.jpg" width="1" height="2" alt="buscar" />
<p align="right"><img src="logoizqabajo.png" width="95" height="15" alt="buscar" align="left"/><img src="logodrchabajo.png" width="61" height="28" alt="buscar" /></p> <img src="derechos.png" width="191" height="9" alt="buscar" align="left" style="margin-top:-20px"/>
Y esta es la accion que ocurrira al hacer click en el
Código PHP:
Ver original<?php
$usuario="root";
$password="";
$bd="admin";
if(isset($_POST['aceptar'])){ $nombre=$_POST['email'];
$email=$_POST['password'];
$sql = mysql_query("SELECT email FROM administradores where ('$_POST[email]') and password=('$_POST[password]')"); if ($num_filas!=0){
$_SESSION['login'] = "ok";
header ("Location: administrar.php"); }
else{
$error= "ERROR";
header ("Location: resgirarse.php");
}
}
?>