<html> <head> </head> <body> <from action="random.php" method="post"> <input type="text" name="user"> <input type="submit"> </from> <?php $name = array("username"=>"A" , "name"=>"B"); echo $name[$_POST["user"]]; ?> </body> </html>
Warning: Undefined array key "user" in C:\Users\user\www\random.php on line Warning: Undefined array key "" in C:\Users\user\www\random.php on line
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)