Jump to content

Mysql password


c_pattle

Recommended Posts

I was just wondering what is the best way to handle passwords using mysql and php.  For example if a user is registering (creating a username and password) and then logging in using that password what is the must secure way to handle this.  Is it okay to just use password like and other field? 

 

Thanks for any help. 

Link to comment
Share on other sites

I am not sure of your experience with programming with php & mysql. But to answer your first question, there are several ways you can configure your code to be inserted into a database.

 

You want to be sure the data being entered is sanitized - meaning it's free of any characters or symbols that could destroy your database or site files. There are several php functions that do just that.

 

The password should use the php md5() function to create a hash of the password in the database for extra security.

 

Using an SSL connection is also not a bad idea for passing secure data through an http connection.

 

The password field type (in html) should be of type=password .. this will ensure the characters are dotted out for visual security..

 

Hope this helps some.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.