Codigo de acceso
Buenas tardes tengo un problema con un código
1) tengo una página de acceso y quisiera que cuando un usuario ingrese su código de acceso entre con su configuración si no esta registrado no entre
este es el phphphphphphphphphphphp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Ingresar</title>
<style type="text/css">
<!--
.Estilo2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
}
body,td,th {
color: #000000;
}
-->
</style>
</head>
<body style="background-image: url(dibujos/bg32.jpg); margin-left: 16px; width: 550px; background-color: rgb(255, 255, 204); color: rgb(0, 0, 0);" alink="#000099" link="#000099" vlink="#990099">
<br>
<table style="text-align: left; background-color: rgb(255, 255, 204); margin-left: 23px; width: 556px; height: 447px;" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td colspan="3" style="background-color: rgb(255, 255, 204); width: 786px;" height="441">
<div style="text-align: center;"><big style="color: rgb(255, 102, 0);"><big><span style="font-weight: bold;">
<br>
</span></big></big><br>
</div>
<p align="center"> <br>
<?php if (empty ($cod_usuario)){
}
$link = mysql_connect("localhost","root","");
mysql_select_db("leomary2", $link);
//echo "conexion lista";
$result = mysql_query ("SELECT cod_usuario FROM usuario ") or die(mysql_error());
echo "".$row["cod_usuario"]="";
if ($row = mysql_fetch_array($result))
{
if($row["cod_usuario"]=docente_4a)
{
header("location: ../bienvenido_al_reporte_seccion_b.html");
}
for ($row["cod_usuario"]=docente_4b)
{
header("location: ../bienvenido_al_reporte.html");
}
do($row["cod_usuario"]=administrador)
{
header("location: ../ADMINISTRADOR.HTML");
}
}
else
{
header("location: ../HISTORIA.html");
}
?>
</p>
<p align="center"> </p>
<p align="center"> </p>
<center>
<table style="width: 633px; height: 115px;" border="0" width="690">
<tbody>
<tr>
<th style="width: 506px;" scope="col" align="left">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="100" width="100">
<param name="movie" value="../dibujos/BOTONES/atras_reportes00.swf">
<param name="quality" value="high">
<embed src="../dibujos/BOTONES/atras_reportes00.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" height="100" width="100">
</object>
</th>
<th style="width: 111px;" scope="col" align="right">
<div align="left">
<p align="right">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" align="right" height="99" width="99">
<param name="movie" value="../dibujos/BOTONES/ingresar_a_seleccionar_reporte.swf">
<param name="quality" value="high">
<embed src="../dibujos/BOTONES/ingresar_a_seleccionar_reporte.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" align="right" height="99" width="99">
</object>
</p>
</div>
<div align="justify"></div>
</th>
</tr>
</tbody>
</table>
<p> </p>
</center>
<div align="right"></div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
y este es el html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Ingresar</title>
<script language="javascript" type="text/javascript">
//Validacion de campos de texto no vacios by Mauricio Escobar
//*********************************************************************************
// Function que valida que un campo contenga un string y no solamente un " "
// Es tipico que al validar un string se diga
// if(cod_usuario == "") ? Alert(Error)
// Si el campo contiene " " entonces la validacion anterior no funciona
//*********************************************************************************
//busca caracteres que no sean espacio en blanco en una cadena
function vacio(q) {
for ( i = 0; i < q.length; i++ ) {
if ( q.charAt(i) != " " ) {...
1) tengo una página de acceso y quisiera que cuando un usuario ingrese su código de acceso entre con su configuración si no esta registrado no entre
este es el phphphphphphphphphphphp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Ingresar</title>
<style type="text/css">
<!--
.Estilo2 {
font-family: Arial, Helvetica, sans-serif;
font-size: 16px;
font-weight: bold;
}
body,td,th {
color: #000000;
}
-->
</style>
</head>
<body style="background-image: url(dibujos/bg32.jpg); margin-left: 16px; width: 550px; background-color: rgb(255, 255, 204); color: rgb(0, 0, 0);" alink="#000099" link="#000099" vlink="#990099">
<br>
<table style="text-align: left; background-color: rgb(255, 255, 204); margin-left: 23px; width: 556px; height: 447px;" cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td colspan="3" style="background-color: rgb(255, 255, 204); width: 786px;" height="441">
<div style="text-align: center;"><big style="color: rgb(255, 102, 0);"><big><span style="font-weight: bold;">
<br>
</span></big></big><br>
</div>
<p align="center"> <br>
<?php if (empty ($cod_usuario)){
}
$link = mysql_connect("localhost","root","");
mysql_select_db("leomary2", $link);
//echo "conexion lista";
$result = mysql_query ("SELECT cod_usuario FROM usuario ") or die(mysql_error());
echo "".$row["cod_usuario"]="";
if ($row = mysql_fetch_array($result))
{
if($row["cod_usuario"]=docente_4a)
{
header("location: ../bienvenido_al_reporte_seccion_b.html");
}
for ($row["cod_usuario"]=docente_4b)
{
header("location: ../bienvenido_al_reporte.html");
}
do($row["cod_usuario"]=administrador)
{
header("location: ../ADMINISTRADOR.HTML");
}
}
else
{
header("location: ../HISTORIA.html");
}
?>
</p>
<p align="center"> </p>
<p align="center"> </p>
<center>
<table style="width: 633px; height: 115px;" border="0" width="690">
<tbody>
<tr>
<th style="width: 506px;" scope="col" align="left">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" height="100" width="100">
<param name="movie" value="../dibujos/BOTONES/atras_reportes00.swf">
<param name="quality" value="high">
<embed src="../dibujos/BOTONES/atras_reportes00.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" height="100" width="100">
</object>
</th>
<th style="width: 111px;" scope="col" align="right">
<div align="left">
<p align="right">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" align="right" height="99" width="99">
<param name="movie" value="../dibujos/BOTONES/ingresar_a_seleccionar_reporte.swf">
<param name="quality" value="high">
<embed src="../dibujos/BOTONES/ingresar_a_seleccionar_reporte.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" align="right" height="99" width="99">
</object>
</p>
</div>
<div align="justify"></div>
</th>
</tr>
</tbody>
</table>
<p> </p>
</center>
<div align="right"></div>
</td>
</tr>
</tbody>
</table>
</body>
</html>
y este es el html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
<title>Ingresar</title>
<script language="javascript" type="text/javascript">
//Validacion de campos de texto no vacios by Mauricio Escobar
//*********************************************************************************
// Function que valida que un campo contenga un string y no solamente un " "
// Es tipico que al validar un string se diga
// if(cod_usuario == "") ? Alert(Error)
// Si el campo contiene " " entonces la validacion anterior no funciona
//*********************************************************************************
//busca caracteres que no sean espacio en blanco en una cadena
function vacio(q) {
for ( i = 0; i < q.length; i++ ) {
if ( q.charAt(i) != " " ) {...
1 respuesta
Respuesta
1
