Saving on text file

hey i have a form that gather any that user fill in

heres my front end form

<html>
<head>
<title>Untitled Document</title>
</head>

<body>
<form action=“test.php” method=“get”>
name <input name=“name” type=“text”><br>
<input name=“Submit” type=“submit” value=“submit”>
</form>
</body>
</html>

my php script

<?php

$name = $_POST[‘name’];

$handle = fopen(“names.txt”, “a” );
fwrite($handle, "$name
" );
fclose($handle);

echo $name

?>

i want whatever the user fill in it will save it in the file and it will append ather user fill ine again and then display it
this code seems dont to work and i dont know why?