heres the code
if ($saveuser) {
include('ukors_adminconnect.php');
$sql = "UPDATE Passwords SET `username`='$username'";
$result = mysql_query($sql);
$result = mysql_query("SELECT * FROM Passwords ORDER by username ASC" ,$db);
while ($myrow = mysql_fetch_array($result)) {
if ($myrow[username] == $username) {
if ($password <> '$myrow[password]') {
$salt = substr($password, 0, 2);
$encrypted_pswd = crypt($password, $salt);
$sql = "UPDATE Passwords SET `password`='$encrypted_pswd'";
$result = mysql_query($sql);
};
};
};
The error is:
Warning: Supplied argument is not a valid MySQL result resource in /local/data/www/htdocs/OED/CruisePlan/users.php on line 82
line 82 is:
while ($myrow = mysql_fetch_array($result)) {
(just a note I can't turn off warnings in php.ini)
anybody got any ideas?
Thanks in advance!


