Page 1 of 1

PHP Data saves from IE but not from Mozilla

Posted: Tue Apr 29, 2008 4:12 am
by lxm
Ok I have an online survey with 4/5 pages. PHP code saves the data to a text file. In IE this works fine but in Mozilla Firefox no data is saved from the first page, however, all the data is saved from the subsequent pages.

Does anyone know why this might be?

Re: PHP Data saves from IE but not from Mozilla

Posted: Tue Apr 29, 2008 4:33 am
by lxm
this is the php code from the page where nothing is saved, it is the same for all the pages:

Code: Select all

 
<?php
 
foreach ($_POST as $key => $val) {
echo '<input type="hidden" name="' . $key . '" value="' . $val . '" />' . "\r\n";
 
}
?>
 

the code from the last page of the survey is:

Code: Select all

 
<?php
   $File = "Results.txt";
 $Handle = fopen($File, 'a');
   foreach ($_POST as $key => $val) {
   //fwrite ($Handle, $val);
 fwrite ( $Handle, $val. "," );
 
 }
 fclose($Handle);
  ?>