How can we encrypt the username and password using PHP?
Answer Posted / abhijita
This is an example Login with encrypted password but don't
forget to encrypt password and insert into database in sign
up process.
// username and password sent from form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
// encrypt password
$encrypted_mypassword=md5($mypassword);
$sql="SELECT * FROM $tbl_name WHERE username='$myusername'
and password='$encrypted_mypassword'";
$result=mysql_query($sql);
| Is This Answer Correct ? | 13 Yes | 3 No |
Post New Answer View All Answers
Explain what does the unset() function means?
What is ci in php?
Write the statements that are used to connect php with mysql
Why use php artisan serve?
Is ruby on rails php?
What are computer variables?
What are the three parts of an http request?
How do I run php?
Tell me what should we do to be able to export data into an excel file?
Describe PHP error and logging information?
What is warning – “cannot modify header information – headers already sent”?
What websites use php?
What is the use of Mbstring?
Is python better than php?
When should you use a stored procedure?