[DEV]UserSystem - [PHP]

Status
Not open for further replies.

Kryptos

prjRev.com
Jul 21, 2010
2,205
1,252
I think the overall design is good but it feels to plain, I think you could add some style to the text fields at the top right and it'd look better.

Very nice work though :)
 

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,637
2,389
Best of luck to you man -- hope it succeeds.

If you want any help or need any tips, check this out I made not long ago. It's not very good but it works!

If it asks for a password, use "m0nstadot" with no quotes.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
Hey guys,

Just going to do some work on the login, then I'll probably post some more snippets, not much yet, but had some sleep so probably go read some more PHP soon. ;]
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
Hi, some updates, I'm now using m0nsta.'s captcha code system, so credits to him, and thinking about using MySQLi.

Ok so some more updates;

I've changed it to MySQLi, after reading RastaLulz's tutorial, so here is login.php(the login code):

PHP:
<?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();
            }
        }
    }
}
?>

If there is anything I can improve on, please let me know! ;D
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
Hey guys,

Ok thanks to Kryptos, I've began to learn OOP, and just doing it simply and improving each step, I know this is going EXTREMELY slow and I've only done a few pages but better to get the main structure done first ;D.

Anyways, here is the new global.php:

PHP:
<?php

session_start();

require('core/mysql/mysql.php');
require('core/users/users.php');
require('core/security/security.php');

$callUserClass = new UserClass();
$callSecurityClass = new SecurityClass();

?>
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
Alright guys, got this working again, had a very stupid bug, was my fault for using mysql_query when I had MySQLi on there.. So i gave up until now when I was bored, so planned:

Recode registration, make it abit more advanced for error checking etc, same with login, then I'll post some work.
 

Kristopher

Photographer
Dec 25, 2010
802
66
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?
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
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 at

You shouldn't need to do anything, as I imagine it will already work, ;] - Also, not done no work at the moment, was getting my sleeping patterns set to gold, so I'll be able to do some work today. :)
 

Kristopher

Photographer
Dec 25, 2010
802
66
Cheers mate anyways ill be expecting this xD you should make it look nice with your sledmore.net layout as thats pretty nice also
 

RyanMK

Still alive
May 27, 2010
802
117
OOP & MySQLi is supposed to be a great combination. Glad to see you're learning this :D I've also been converting tBlogger to MySQLi :p
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
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.
 
  • Like
Reactions: Ept

Ept

Many men wish death upon me.
Jun 16, 2011
591
276
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.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
This looks really good, I can't wait until your user-system is done! Good luck.

Thanks, I went along with a new skin design, I put on the credits etc;

Danny94, original design/css.
for MySQLi help.
& help along the way.

Screenshot(s):

Index:
e8duyb.png



Login.php:

7qs1ck.png


Index.php?taken

d6mc34.png


- You will not be taken to the main register if the name is taken..

register.php:

hbw4m9.png
 

Kaz

BooYah
Staff member
Nov 16, 2010
3,064
1,025
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.
 

Andeh

the best cis-boy
Jun 1, 2010
892
124
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.
 

Sledmore

Chaturbate Livestreamer
Staff member
FindRetros Moderator
Jul 24, 2010
5,195
3,906
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.

Cheers, and just something to build upon, things will change as I go on, and yeah Footer was just something I noted to down to get in place.

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.

Cheers, but say what? lol.

No progress atm, been in bed, working hard ;]
 
Status
Not open for further replies.

Users who are viewing this thread

Top