Erich Beyrent wrote:
Hi all,

I need some advice as to how to manage a user login system using PHP and
MySQL.  Currently, I have the following table:

+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| MemberID    | bigint(20)   |      | PRI | NULL    | auto_increment |
| MemberFname | varchar(30)  |      |     |         |                |
| MemberLname | varchar(40)  |      |     |         |                |
| Login       | varchar(8)   |      |     |         |                |
| Password    | varchar(32)  |      |     |         |                |
| Bio         | text         | YES  |     | NULL    |                |
| Address     | varchar(127) | YES  |     | NULL    |                |
| City        | varchar(40)  | YES  |     | NULL    |                |
| State       | char(2)      | YES  |     | NULL    |                |
| Zip         | int(5)       | YES  |     | NULL    |                |
| Phone       | varchar(20)  | YES  |     | NULL    |                |
| Cell        | varchar(20)  | YES  |     | NULL    |                |
| Email       | varchar(40)  | YES  |     | NULL    |                |
+-------------+--------------+------+-----+---------+----------------+

And my PHP function looks like this:

Add a unique key on Login, and make sure to properly escape user input with mysql_real_escape_string() or mysql_escape_string() in older PHP versions.


--
Sasha Pachev
Create online surveys at http://www.surveyz.com/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to