Este es el codigo; un formulario con codigo php en su inicio y html al final.
Código :
<?
session_start();
session_name("editor");
session_register('nombre_usuario');
session_register('clave_usuario');
$usuario="nombrex";
$pass=12345;
$_SESSION['nombre_usuario']=$_POST['nombre_usuario'];
$_SESSION['clave_usuario']=$_POST['clave_usuario'];
if ($_SESSION['nombre_usuario']=="nombrex" && $_SESSION['clave_usuario']=="12345"){
$_SESSION["autenticado"]= "ok";
header ("Location: editor de texto-plus.php");
}
else {
header ("Location: form logeo.php);
}
?>
<html>ml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Loggin</title>
<style type="text/css">
<!--
.Estilo1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 12px;
}
body {
background-color: #D7E1E1;
}
-->
</style>
</head>
<body>
<form id="form1" name="form1" method="post" action="form logeo.php">
<table width="300" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%"> </td>
<td colspan="2"><span class="Estilo1">Ingrese sus datos</span></td>
<td width="16%" colspan="3" rowspan="6"> </td>
</tr>
<tr>
<td> </td>
<td width="27%"> </td>
<td width="56%"> </td>
</tr>
<tr>
<td> </td>
<td class="Estilo1">Usuario:</td>
<td><label>
<input type="text" name="nombre_usuario" id="textfield" />
</label></td>
</tr>
<tr>
<td> </td>
<td class="Estilo1">Pass:</td>
<td><label>
<input type="text" name="clave_usuario" id="textfield2" />
</label></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><label>
<input type="submit" name="button" id="button" value="Entrar" />
</label></td>
</tr>
</table>
</form>
</body>
</html>
Gracias
