<?php
include( "includes/functions.php" );
isloggedin();
$error = $_GET["error"];
if (isset($_POST['login']))
{
$username = secured($_POST['username']);
$password = md5(secured($_POST['password']));
if (empty($username) || empty($password))
{
Header("Location: login.php?error=blank");
}
else
{
$GetUserInfo = $db->query("SELECT * FROM users WHERE `username` = '$username'");
if ($GetUserInfo->numrows == 1)
{
Header("Location: login.php?error=uds");
exit;
}
else
{
$userInfo = $GetUserInfo->fetch_object();
if ($password != $userInfo->password)
{
Header("Location: login.php?error=password");
exit;
}
else
{
login();
}
}
}
}
?>
<?php
session_start();
require('core/mysql/mysql.php');
require('core/users/users.php');
require('core/security/security.php');
$callUserClass = new UserClass();
$callSecurityClass = new SecurityClass();
?>
So i'm guessing most cpanel dont have mysqli aye? well atleast mine dont i use ites0's webhosting could you create a mysql one?
The mysqli extension allows you to access the functionality provided by MySQL 4.1 and above. More information about the MySQL Database server can be found atYou must be registered for see links
This looks really good, I can't wait until your user-system is done! Good luck.Improved this abit today, was working on some other project and used this as a little base and Kryptos helped me with a simple fix on my users class, so that's all sorted for regsitering, when you register it now sets a session and logs you in, going to work on a new basic design, also done some more work on register, made the register on the index link-up with the register.php file as before I had two scripts D; now it's easier to do, going to make the register more advanced, but for now going to work on the skin..
Sorry this is taking so long, I switch projects too much xD. - I'll post snippets soon.
This looks really good, I can't wait until your user-system is done! Good luck.
Looking nice Craig, is this a user system for any particular purpose or one to build upon?
1 little thing im not a huge fan of: the footer, its a bit of a mouthful lol.
Good luck, Craig.
I made the same just with news posting for rank 2 and above and without a messaging system, it's a good strategy to learn more PHP.