Hi Russ,
Sorry, my english isn't so good :-)
Well: The user name and password I have given to MySQL work fine.
In this MySQL, I tried to make a database, where people can log in with their username and passwords.
So I defined:
<?
if ((!$fornavn) || (!$efternavn) || (!$bruger) || (!$password)) {
header("Location: http://localhost/show_adduser.html");
exit;
}
$db_name = "testDB";
$table_name = "add_users";
$connection = @mysql_connect("localhost", "chill", "test")
or die("Couldn't connect.");
$db = mysql_select_db($db_name, $connection)
or die("Couldn't select database.");
$sql = "INSERT INTO $table_name
(f_name, l_name, username, password)
VALUES
(\"$f_name\", \"$l_name\",\"$username\",password(\"$password\"))
";
$result = mysql_query($sql,$connection)
or die("Couldn't execute query.");
?>
Now: The f_name always came up as "Chill" which is the connection's name. Not f_name.
Whoevers first name I wrote, It ended with "Chill" anyway.
Now...
I changed everything to danish names: fornavn instead of f_name, efternavn instead of l_name and bruger instead of username... And it actually worked.
But I still don't understand why, since the script was the same?
Why was the name "Chill" substitued to the value f_name?
Good question, eh? :-))
Regards,
Chill