Two possibilities:
1) try this for the first line:
if(!$username == ""){
//you missed the open brackets in your above
if that doesn't work, try using the absolute path to your file, such as like this:
//line 3
$fp = fopen("/home/something/pub_html/data/member.txt","a+");
you'll have to get the absolute path, the one I listed is just an example.
You might also want to post what error msg you get when you run your script (it helps).
You also should think about error coding your script. such as if($saving = fputs($fp, "$username:$pwd:$password\n")){
echo("the data was saved. No problems here");
} else {
echo("there was an error. oh my");
}
good luck.