Register and join over 40,000 other developers!
Recent Topics
-
The Game You Are Waiting For?
WendellHarper - Dec 06 2020 01:21 PM
-
Quora and Reddit Backlinks
WendellHarper - Dec 06 2020 01:14 PM
-
Delete account
pindo - Jul 23 2020 01:33 AM
-
Print specific values from dictionary with a specific key name
Siten0308 - Jun 20 2019 01:43 PM
-
Learn algorithms and programming concepts
johnnylo - Apr 23 2019 07:49 AM
Recent Blog Entries
Recent Status Updates
Popular Tags
- networking
- Managed C++
- stream
- console
- database
- authentication
- Visual Basic 4 / 5 / 6
- session
- Connection
- asp.net
- import
- syntax
- hardware
- html5
- array
- mysql
- java
- php
- c++
- string
- C#
- html
- loop
- timer
- jquery
- ajax
- javascript
- programming
- android
- css
- assembly
- c
- form
- vb.net
- xml
- linked list
- login
- encryption
- pseudocode
- calculator
- sql
- python
- setup
- help
- game
- combobox
- binary
- hello world
- grid
- innerHTML

Creating A Simple Yet Secured Login/registration With Php5
Started by papabear, May 08 2012 03:28 PM
encryption registration login
113 replies to this topic
#13
Posted 11 July 2012 - 09:24 AM
Works great thanks
#14
Posted 27 August 2012 - 11:53 AM
Hi mate, I've tried your script and it works fine!
to bad you don't use sessions cuz this is what i was realy looking for.
i've made a site in php5 with multiple pages that have sql fed dropdown menu's that a user would be able to feed him/her self. Now i want to add an usersystem to this, so the same site is usable for multiple users. each having there own logins and db info i know how i wanna manage the db and site with the seperate user info. but the session stuff is completely new to me.
the way it is now is could make a verry simple insecure page reload in place of the welcome message and it would work for me.. but then theres the problem that other users could simply try a ton of other usernames to get into some one else's page.. 1 problem i realy dont want to have.
can you give me a nice pointer in the right direction how to make the sessions?
to bad you don't use sessions cuz this is what i was realy looking for.
i've made a site in php5 with multiple pages that have sql fed dropdown menu's that a user would be able to feed him/her self. Now i want to add an usersystem to this, so the same site is usable for multiple users. each having there own logins and db info i know how i wanna manage the db and site with the seperate user info. but the session stuff is completely new to me.
the way it is now is could make a verry simple insecure page reload in place of the welcome message and it would work for me.. but then theres the problem that other users could simply try a ton of other usernames to get into some one else's page.. 1 problem i realy dont want to have.
can you give me a nice pointer in the right direction how to make the sessions?
#15
Posted 28 August 2012 - 07:36 AM
I wanrt to include regural expression to the code. And an email. What should i do as am knew to coding.
Buy the way. Thanks for this code. And bringing oop to coding. But how can i include regural expression to this great code and an email.
Buy the way. Thanks for this code. And bringing oop to coding. But how can i include regural expression to this great code and an email.
#16
Posted 26 September 2012 - 05:25 AM
I wanrt to include regural expression to the code. And an email. What should i do as am knew to coding.
Buy the way. Thanks for this code. And bringing oop to coding. But how can i include regural expression to this great code and an email.
you can use the function preg_match
here is the syntax
and here's an example use of it
<?php // The "i" after the pattern delimiter indicates a case-insensitive search if (preg_match("/php/i", "PHP is the web scripting language of choice.")) { echo "A match was found."; } else { echo "A match was not found."; } ?>
for more information about this function please go to http://php.net/manua....preg-match.php
Life has no CTRL+Z
Never Forget To HIT "LIKE" If I Helped
Never Forget To HIT "LIKE" If I Helped
#17
Posted 28 September 2012 - 01:41 AM
hy, nice tutorial, but its have a bug you can register the same user name how many times you want so you must to put it restrict when the user name is allready registed
#18
Posted 28 September 2012 - 06:26 AM
hy, nice tutorial, but its have a bug you can register the same user name how many times you want so you must to put it restrict when the user name is allready registed
this is for illustration or tutorial purpose of making your POST values secured

I really did not put a rule about the username being unique.. it's up to the reader if he wants to improve everything

Life has no CTRL+Z
Never Forget To HIT "LIKE" If I Helped
Never Forget To HIT "LIKE" If I Helped
#19
Posted 30 October 2012 - 06:34 PM
Very nice tutorial, great reading stuff.
I'm new in OOP, but I'm playing around with your script.
I'm new in OOP, but I'm playing around with your script.
#20
Posted 31 October 2012 - 07:06 AM
Very nice tutorial, great reading stuff.
I'm new in OOP, but I'm playing around with your script.
It's good to know that people are enjoying my tutorials

Life has no CTRL+Z
Never Forget To HIT "LIKE" If I Helped
Never Forget To HIT "LIKE" If I Helped
#21
Posted 01 November 2012 - 01:05 AM
If some have problems with PDO driver, I can say you need to install php(53)-extensions and configure it with PDO driver for MySQL support.
I'm sitting behind a FreeBSD server, can't say if you need to do that in other systems, or how if so.
Just to mention it, if it could be helpful
I'm sitting behind a FreeBSD server, can't say if you need to do that in other systems, or how if so.
Just to mention it, if it could be helpful

#22
Posted 12 November 2012 - 04:30 AM
Super tutorial papabear. Amazing learning example! I'm a PHP newbie and have one question regarding tutorial.
Why did you use composite primary keys in created table `users` PRIMARY KEY (`userID`,`username`) ?
Why did you use composite primary keys in created table `users` PRIMARY KEY (`userID`,`username`) ?
#23
Posted 12 November 2012 - 04:47 AM
Sounds unnecessary to me, but both fields should be indexed unique, but only userID needs to be in primary in my opinion.
I'm a System developer at XLENT Consultant Group mainly working with SugarCRM.
Please DO NOT send mail or PM to me with programming questions, post them in the appropriate forum instead, where I and others can answer you.
#24
Posted 12 November 2012 - 05:55 AM
Sounds unnecessary to me, but both fields should be indexed unique, but only userID needs to be in primary in my opinion.
yes, if following the database normalization userID must be the only primary key there... I haven't noticed that I also make the username primary key instead of making it a unique key, but this will work... my purpose is to have a unique username, I might have click the button in phpmyadmin wrong >_<
Life has no CTRL+Z
Never Forget To HIT "LIKE" If I Helped
Never Forget To HIT "LIKE" If I Helped
Also tagged with one or more of these keywords: encryption, registration, login
![]() File decryptionStarted by gluttz, 23 Apr 2014 ![]() |
|
![]() |
||
Language Forums →
PHP →
need some help in converting this code from mysl to pdoStarted by NanaKwekuDenise, 14 Mar 2014 ![]() |
|
![]() |
||
General Forums →
General Programming →
Providing web resources only to authenticated usersStarted by Kaishain, 01 Feb 2014 ![]() |
|
![]() |
||
Language Forums →
Java →
check if user is login or notStarted by game2d, 16 Dec 2013 ![]() |
|
![]() |
||
![]() Problems with AES key scheduleStarted by mebob, 14 Nov 2013 ![]() |
|
![]() |
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download