I have a function that is supposed to save an array to a file that I give to it, but every array variable is supposed to be tab separated...At this point I have the function but it's not creating any file and it's not writing anything to it...Also for some reason when I try to give an array from another page, it giving me an undefined index error, even though I started a session on both page..can you help with either of the too
function saveorder($file,$arr){
@ $fp = fopen($file, 'w');
flock($fp, LOCK_EX);
if (!$fp) {
echo "<p>Your order could not be processed at this time.</p>";
}
else {
fwrite($fp, _SESSION);
flock($fp, LOCK_UN);
fclose($fp);
echo("<p>Order written to $file file.</p>");
}
}