hypgraphix Posted April 19, 2007 Share Posted April 19, 2007 My client wants a splash page for his initial index page and doesn't not want people to be able to go any further into the website with a username and password he will provide for them directly. On that splash page he wants a place for them to login with the username and password he provided. How to I create a database for this? I am total lost! Please help me. I am brand new to this stuff. Thanks so much to anyone who will help me! Quote Link to comment Share on other sites More sharing options...
Wildbug Posted April 19, 2007 Share Posted April 19, 2007 Give or take a few, there are about a million helpful references on this topic. Try Google, and start reading. Quote Link to comment Share on other sites More sharing options...
CanMike Posted April 19, 2007 Share Posted April 19, 2007 Designing databases is a job by itself! Minimum requirement would be a one table with three columns: client_id, username and password. create table client( client_id int(10), username tinytext not null, userpass varchar(50) ); When inserting you could use the syntax: INSERT INTO client VALUES (<client number>, '<username>', PASSWORD('<password>'); When confirming the user you could use the syntax: SELECT username FROM client WHERE client_id = <input id value> AND userpass = password(<'password supplied'>); With what little information you have supplied, there is no way to really help you out. These are just suggestions. If you need a database designed and constructed you may consider a third party vendor. A badly built database will kill you in the long run. I know, I built Oracle and MySQL database for a living. Quote Link to comment Share on other sites More sharing options...
bubblegum.anarchy Posted April 20, 2007 Share Posted April 20, 2007 CanMike: The following is straight out of the mysql documention with added underline. Note: The PASSWORD() function is used by the authentication system in MySQL Server; you should not use it in your own applications. For that purpose, use MD5() or SHA1() instead. Also see RFC 2195 for more information about handling passwords and authentication securely in your applications. Quote Link to comment Share on other sites More sharing options...
CanMike Posted April 20, 2007 Share Posted April 20, 2007 The password() function is the minimum requirement to encrypt data. You can use MD5() of SHA1(), depending upon the depth of encryption you require. This is why designing and building a database can be a lot more complicated than you think. As I stated in my response, this is just a suggestion has to how you could add a table to a database, populate the fields and then access the data. You'll have to talk to your client to get a clear understanding as to how 'encrypted' the data must be. I use the password() function on all my applications without any problems to date. I've used SHA1 on v4 MySQL and had a problem with the function when I upgraded to v5 MySQL. It was a problem with the initial length of the field in the column definition. Quote Link to comment Share on other sites More sharing options...
bubblegum.anarchy Posted April 20, 2007 Share Posted April 20, 2007 I use password() too - I only came across that info today when I had some issues myself and had to revert to using old_password() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.