...

View Full Version : Need Help About Save Data



Snow Prince
11-04-2010, 02:52 PM
Hy All,


<?
$ss1 = $_REQUEST['ss1'];
$sss = ">".$ss1."<";
$file =dirname(__FILE__)."/data.txt";
$Saved_File = fopen($file, 'a');
fwrite($Saved_File, "$sss\n");
fclose($Saved_File);
?>

By This Code I Can Easily Save Requested Data In A Text File.
Now If Requested Data Like That >> aa;bb;cc << And If I Want To Save Them By Serial.I mean,

aa
bb
cc

Like That.Then What I Have To Do???
pls help me

mlseim
11-04-2010, 03:04 PM
<?
$ss1 = $_REQUEST['ss1'];
$items=explode(";",$ss1);
//$sss = ">".$ss1."<";
$file =dirname(__FILE__)."/data.txt";
$Saved_File = fopen($file, 'a');
foreach($items as $value){
fwrite($Saved_File, "$value\n");
}
fclose($Saved_File);
?>

Snow Prince
11-04-2010, 07:11 PM
Thanks a lot bro :x



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum