How To Insert Encoded Passwords Into MYSQL Database PHP Code Script Sample

Mobile
feeds
Welcome Login | Register

How To Insert Encoded Passwords Into MYSQL Database PHP Code Script Sample
  Forums Index
      » MYSQL Forums
        » » How To Insert Encoded Passwords Into MYSQL Database PHP Code Script Sample



How To Insert Encoded Passwords Into MYSQL Database PHP Code Script Sample
Post Description:
Post Tags: how, to, insert, encoded, passwords, into, mysql, database, php, code, script, sample, mysql database, support, help, answers, questions, help
This Post Has Been Viewed 1758 Times Since Tue Mar 06, 2007 1:47 am Posted By hostman with 1 replies
How To Insert Encoded Passwords Into MYSQL Database PHP Code Script Sample
the other day i was trying to get a password for a user, i went to phpmyadmin and when i pulled up the user, i noticed that the password has a long code-like is was like this: 69206c6971528ae2e0c32ddeb21653df

I was thinking, how can I do that. How can you put secured passwords like that. Well that answer is simple. Thanks to the support team at www.webune.com for their PHP/MYSQL Hosting services they provide us so we can get the answers to these questions. If you ever need web hosting for your website, check them out, they are great services.

anyway, to encrypt or encode a password into mysql all you need to do is use the md5 function in php. for example, lets say i have a variable called $password and the value of $password is equals to mypass, this is how it would like:

$password = "mypassword";

so to encypt this so you can insert it into your sql database, just use the md5 function in php like this:

$password = "mypassword";
$password = md5($password );

now the value of $password is encoded and you can insert it into your databe. if you want a little snippet you can use try this:


     Code:
<?
$password = "mypassword";
$password = md5($password );
echo $password;
?>


just copy and save the above code and save it with your notepad as md5.php and open it with your browser and it will display or show you the encrypted or encoded value of $password, it will not display "mypass" but no bumbers. The only thing you need is to make sure you have a PHP website, if you don't have php on your website, you can visit our friends at www.webune.com and signup with a PHP/MYSQL webhosting plan.


Leave Your Comments






Share
URL:
You can use this HTML code to put it on your website to show your friends this wallpaper. Use this code on your profile like myspace, friendster, Facebook or others. Just Copy and Paste it in your HTML on your websites



Fourms BBCODE:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums





Comments and replies About How To Insert Encoded Passwords Into MYSQL Database PHP Code Script Sample




:: 1 :: Reply #792 Reply By hamster-a.rar On Mon Mar 12, 2007 8:31 am
99103ce447eb31c35afd4fb7a7f1a03f