View Single Post
Old 05-08-2004, 11:35 AM   #5 (permalink)
SVB
Inactive
 
SVB's Avatar
 
Join Date: 10-13-03
Posts: 7,481
iTrader: 0 / 0%
Latest Blog:
None

SVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest orderSVB is a web professional of the highest order
Send a message via Yahoo to SVB
[code:1:9acd7105f5]
<?php
include("database.php");

$query2 = "SELECT * FROM users";

$result2 = mysql_query($query2) or die(mysql_error());
while ($row = mysql_fetch_array($result2)) {
$randpass= rand();
$query = "UPDATE users SET password = md5('$randpass')";
$result = mysql_query($query) or die(mysql_error());
/*mail code goes here*/
echo $row["email"] . "<BR>Username: " . $row["username"] . "<BR>Password: " . $randpass . "<BR><BR>";
}

?>
[/code:1:9acd7105f5]

I did that. In the echo bit at the end, its fine, it echo's a different random password for eceryone. However, the update query has updated everyone with the same md5 password.
SVB is offline   Reply With Quote