ok, there's 4 files
this is all quick and dirty
i havent included the MYsql_class.php
what im asking is about my session control, not how well i use the...
mysql_real_escape_string() function
but i have included the returns from the sql calls, so assesments can be made from these
the code is fully executable on a php compatible server, you can run it if you'de like to test ( i copy pasted this from my files right after testing, so there shouldn't be typo's )
( i've included a logoff button on successful login for convenience )
I would like as much constructive criticism as you can give me
I want this to be 100% secure (as far as known vulnarabilities go)
Any and all feedback is much appreciated,
P.S once again, this is all quick and dirty, so if it's not clear, ask me or re-read it 🙂
Thank you
...
...includes are attached with ".txt" extensions...
...rename to ".php" if you're going to read it in vim or another color-coding text editor...
...
it all starts in index.php here...
<?php
include( 'sess_control.php' );
include( 'MYsql_class.php' );
include( 'home.php' );
include( 'functions.php' );
$MYsql = new MYsql;
if ( isset($_SESSION['_ID']) && DB_test() )
{
home();
}
else
{
?>
<html>
<head><title>User Login</title></head>
<body>
<div style="text-align:center;">
<form method="POST" action="index.php">
<table>
<tr>
<td>Username: </td><td><input name="user" type="text" value""></td>
</tr>
<tr>
<td>Password: </td><td><input name="passwd" type="password" value=""></td>
</tr>
<tr>
<td colspan=2><input type="submit" value="Login"></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
}
?>
Thanx again...
Regards,
Dev_M!nX