Reply to writing to a txt file from a form

Your name:

Reply:


Posted by programming on 04/09/07 09:07

Hi all,

i am having trouble trying to write a script to a txt file. I am
attempting to seperate each posted item with the deliminater '|', but
for some reason i am getting the following information written:

peri|jones||||Submit

Whereas the desired input should be as follows WITHOUT the submit
button been printed and on a NEW LINE:

peri|password|perry|jones|xyz@mail.com

The script i have test over and over again is as follows:

<?php

$data = implode('|', $_POST);

if (get_magic_quotes_gpc()) {
$data = stripslashes($data);
}

$listf = fopen ("username/member.txt", "a+");
$data = chop($data);
fwrite($listf, "$data\n");
fclose($listf);

?>

So, fellow php users how can i adapt the code to allow me to write the
input as above?
And how can i cleanly write to a new line as well?

Cheers,

Peri...

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация