Becouse you use a variable $_POST['name1'] , but this hasn't been set when you enter the site first.
that's a warning message, its helpful when you troubleshooting your code.
You should use empty or isset functions to know that your variable is empty or not, or has set before.
for example:
if(!empty( $_POST['name1']))
{
$new_value= $_POST['name1'];
}