Well I have this mysql database with some passwords. Now I have a form where a dropdown list is populated with the name of the users (there are repeated names). Well what I'm trying to do is after selecting an user in the dropdown list, the post will be directed to a result form where I'll have again the name of the user and now his password (for that exact row).
Here is the code for my first page:
<?php
include ("connect.php");
echo "<html>\n<head>\n<title>User Passwords</title>\n</head>\n<body>\n";
echo "<form action=\"password.php\" method=\"POST\">\n<select name=\"nomes\">\n";
while ($r = mysql_fetch_array($query))
{
$nome = $r["nome"];
echo "<option value=\"$nome\">$nome</option>\n";
}
echo "</select>\n";
echo "<p><input type=\"submit\" value=\"Dados de Acesso\" name=\"select\"></p>\n</form>\n</body>\n</html>";
?>
How should be the password.php file????
😕