I have a login script running, worked great, with one username password combo
$user_passwords = array (
"username1" => "password1",
);
However, I now want to add more users, the usernames and passwords are stored in a mySQL database table.
I tried doing this:
$linkjournal = mysql_connect("localhost", "mysqluser", "pass");
$selectjournal = mysql_select_db("mydb");
$result = mysql_query("SELECT user, pass FROM users");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
$user_passwords = array (
$row[0] => $row[1],
);
But it only retains the last row (and hence only one username password combination) in the array. I searched in the manual, but none of the examples helped. I'm sure this is really simple, but I'm stumped,
Many thanks,
ucbones