I'm trying to get the output to be what the user types in to the input field but it says "undefined" when I press submit. Why is this and how do I fix it, Thanks

```js
function myFunction() {
  document.getElementById("output").innerHTML = document.getElementById("input").value;
}
```

```html
<form id="input" action="/action_page.php">
  input: <input type="text" name="input"><br><br>
  <input type="button" onclick="myFunction()" value="Submit">
</form>

<p id="output"></p>
```

I got it, i had 2 things with the same id