I have a form that saves the input data as such:
This php program reads it back to the screen as it is writen and as you see it above.
<?php
$YourFile = "meeting.survey";
$handle = fopen($YourFile, 'r');
while (!feof($handle))
{
$Data = fgets($handle);
print $Data;
print "<hr>";
}
fclose($handle);
?>
The code below fails. I feel it is because I am using 'explode' incorrectly.
<?php
$YourFile = "meeting.survey";
$handle = fopen($YourFile, 'r');
while (!feof($handle))
{
$Data = fgets($handle);
$answers = explode(',', $Data);
print $answers[0];
print $answers[1];
print $answers[2];
print $answers[3];
print $answers[4];
print $answers[5];
print $answers[6];
print $answers[7];
print $answers[8];
print $answers[9];
print $answers[10];
print $answers[11];
print $answers[12];
print $answers[13];
print $answers[14];
print $answers[15];
print $answers[16];
print $answers[17];
print $answers[18];
print $answers[19];
print $answers[20];
print $answers[21];
print "<hr>";
}
fclose($handle);
?>
My PHP coding skills are minimal at best, any help, direction, comments you have will be greatly appreciated.
If you wish to view the survey html go here
If you wish to view the php code used to produce the data,
wget http://texasflyfishers.org/quiz/php_tutorial/survey.php
If you wish to view a readback of the data go here
Everything I've been able to find over the web, tells me this is what I need to do if I want to add some text that tells what each responce means.