在value =''字段中添加$ _POST

I'm continuing to play around with PHP, and what I'd like to do is to pass variables from one form to another.

However, I can't manage to get an input field to work! I think I'm putting in the $_POST incorrectly. Help fixing this greatly appreciated

What's wrong with the code below?

echo "<input type='text' name='amount' value='$_POST['amount']' />";

give it like

echo "<input type='text' name='amount' value='".$_POST['amount']."' />"; 

You don't need to use quotes to delimit the array keys inside the double-quoted string, so this:

echo "<input type='text' name='amount' value='$_POST[amount]' />";

... would suffice.

echo "<input type=\"text\" name=\"amount\" value=\"$_POST['amount']\" />";