Thor
Honorary Master
- Joined
- Jun 5, 2014
- Messages
- 44,236
Hello, can someone please guide me in the right direction here.
I have a user ( hard coded in the DB which is the admin this admin user is admin becuase in my DB I have a column called isAdmin which is a Boolean and is set to 1 )
Now my question is, would the following be fine for normal user registration ie what are the security risks if any for handling normal registrations like this:
Thus by default all users are set to 0, I went into the DB to make myself an Admin by changing 0 to 1
Is this safe and fine or should I get a whack and do it different?
EDIT:
See this post for clarification -> http://mybroadband.co.za/vb/showthr...t-Practice?p=18623245&viewfull=1#post18623245
I have a user ( hard coded in the DB which is the admin this admin user is admin becuase in my DB I have a column called isAdmin which is a Boolean and is set to 1 )
Now my question is, would the following be fine for normal user registration ie what are the security risks if any for handling normal registrations like this:
PHP:
"INSERT INTO users(userName, userEmail, userPassword, isAdmin) VALUES('" . $name . "', '" . $email . "', '" . md5($password) . "', '0')")
Thus by default all users are set to 0, I went into the DB to make myself an Admin by changing 0 to 1
Is this safe and fine or should I get a whack and do it different?
EDIT:
See this post for clarification -> http://mybroadband.co.za/vb/showthr...t-Practice?p=18623245&viewfull=1#post18623245
Last edited:

