# Saving on text file

**URL:** <https://forum.kirupa.com/t/saving-on-text-file/92648>\
**Category:** Uncategorized\
**Created:** [October 20, 2003, 3:53am UTC](https://forum.kirupa.com/t/saving-on-text-file/92648 "2003-10-20T03:53:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bongbox](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@bongbox](https://forum.kirupa.com/u/bongbox)\
**Post date:** [October 20, 2003, 3:53am UTC](https://forum.kirupa.com/t/saving-on-text-file/92648/1 "2003-10-20T03:53:25Z")

</div>

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?
