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?
PHP Data saves from IE but not from Mozilla
Moderator: General Moderators
Re: PHP Data saves from IE but not from Mozilla
this is the php code from the page where nothing is saved, it is the same for all the pages:
the code from the last page of the survey is:
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);
?>