Password alert

wxdqz

New Member
Hi!

Can anyone tell me how I can make the name and password pop up as an alert without having to reload the page when I click on the submit button?

print "<form action=\"$PHP_SELF\" method=\"post\">";
print "<select name=\"forgotten_pswd\">\n";

$select = mysql_query("SELECT name, password FROM people ORDER BY name", $mysql_access);
if (!$select)
echo mysql_error();

while(list($name, $password) = mysql_fetch_row($select))
print "<option value=http://www.phpbuilder.com/board/archive/index.php/\"$password\">$name</option>";
print "</select>\n";

if ($display)
echo "<script language=\"javascript\">alert('$name: $forgotten_pswd');</script>";

print "<input type=\"submit\" name=\"display\" value=http://www.phpbuilder.com/board/archive/index.php/\"display\">\n";

print "</form>";

Thanks!
 
Back
Top