|
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...
Navigation:
[Reply to this message]
|