MySQL/database design and coding for Front-End Web Developer
The code value is basically a unique 'product' value (like a bar code). Each user must have a code value so they than track their product(s).
That being said, the code value is not used for user login. However it would be required at least 1 when the user signs up for the first time.
Hope this helps.
i understand it can be any value but what is the point of the code value. Does this have any dependency on the user login or not. In order for the script i would need to know if and how the code value intends to be used.
I write a large number of secure login sctipts each month and i would write this one using php. Php sessions and mysql database using md5 sum for the password.
Sorry for the delay in replying I have been in meetings.
below is the mysql code for the database side. Do you need help with the following.
Connecting to the database
creating user registration
creating user login
creating the user authentication script to protect pages (stops no logged in members access pages)
CREATE TABLE IF NOT EXISTS `members` (
`user_id` int(11) NOT NULL AUTO_INCREMENT,
`user` varchar(100) NOT NULL,
`passwd` varchar(300) NOT NULL,
`email` varchar(300) NOT NULL,
`code` varchar(20) NOT NULL,
`name` varchar(150) NOT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
passwords should always be encrypted with md5 when the are entered to the database