PHP Data saves from IE but not from Mozilla

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
lxm
Forum Newbie
Posts: 4
Joined: Tue Apr 29, 2008 4:10 am

PHP Data saves from IE but not from Mozilla

Post 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?
lxm
Forum Newbie
Posts: 4
Joined: Tue Apr 29, 2008 4:10 am

Re: PHP Data saves from IE but not from Mozilla

Post 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);
  ?>
 
 
Post Reply