es un mero formulario pero cuando lo mando ejecutar simplemente ase nada, si alguien tiene alguna idea se los agrade seria.
Código PHP:
<?php
//Getting lists
require ("_cls/cls_mysqlData.php");
require ("_cls/cls_Login.php");
$usu = "";
$pass = "";
if(isset($_POST["txtusu"])){$usu = $_POST["txtusu"];}
if(isset($_POST["txtpass"])){$pass = $_POST["txtpass"];}
if(isset($_POST["txtusu"])){$Login = getLogin($usu,$pass);}
echo $usu.'<br/>'.$pass;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Sistema de Seguimiento a Apoyos Comprometidos</title>
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.form.js"></script>
</head>
<body>
<div id="page_content" style="height:230px;">
<form action="login.php" method="post">
<table width="100%" border="0" style="background-position:inherit;">
<tr>
<td style="height: 62px;" colspan="2"><p style="text-align: center; background-position:top; font-size: 14pt; font-family: Arial">
Sistema de Compromisos</p>
</td>
</tr>
<tr>
<td style="text-align: right; height: 40px;">
*Nombre de Usuario:
</td>
<td style="height: 40px">
<input name="txtusu" type="text" maxlength="20" id="Text1"/>
</td>
</tr>
<tr>
<td style="text-align: right; height: 40px;">
*Contraseña:
</td>
<td style="height: 40px">
<input id="txtpass" name="txtpass" type="password" maxlength="10" /></td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" value="Accesar" id="submit" name="submit" />
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
Código PHP:
<?php
session_start();
function getLogin($usu, $pass){
$usu = $usu;
$pass = $pass;
$db = new db();
$Con = $db->query("SELECT * FROM `usario` where USUARIO = '".$usu."' and password = '".$pass."'");
//echo ("SELECT * FROM `usario` where USUARIO = '".$usu."' and password = '".$pass."'");
//echo $Con;
//exit();
$ArrSol = $db->fetch_array($Con);
$_SESSION['USUARIO'] = "";
$_SESSION['COMICION'] = "";
$_SESSION['NOMBRE'] = "";
$_SESSION['TIPO'] = "";
$_SESSION['USUARIO'] = $ArrSol["USUARIO"];
$_SESSION['COMICION'] = $ArrSol["comicion"];
$_SESSION['NOMBRE'] = $ArrSol["NOMBRE"].' '.$ArrSol["AP"].' '.$ArrSol["AP"];
$_SESSION['TIPO'] = $ArrSol["tipo"];
unset($db, $Con, $ArrSol);
return $_SESSION['USUARIO'];
if (isset($_SESSION['USUARIO'])){header("Location: [index.php]");}
else{header("Location: [login.php?error=1]");}
}
?>