Click here to Skip to main content
15,922,427 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
HTML
<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>

Error:
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 


What I have tried:

I haven't tried anything else just the code above
Posted
Updated 12-Aug-23 9:22am
v3

1 solution

I'm so dumb I spelled form wrong
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900