i have a site and im upgrading it to a new script. but the password table needs to be updated with a mass md5 encryption. how would i go about doing this ?
<?php $query = mysql_query("SELECT * FROM `users` WHERE 1"); while ($row = mysql_fetch_assoc($query)) { mysql_query("UPDATE `users` SET `password` = '" . md5($row['password']) . "' WHERE `ID_USER` = " . $row['ID_USER'] . " LIMIT 1"); } echo "All done"; ?> PHP: users -> user table password -> password column ID_USER -> the primary key I suggest you backup your table before you do this, just in case you accidentally run it 2 times and lose all the passwords.