Hello all of you and Thanks for the prompt reply,
abc123, I don't think i know how because i wnat to keep it simple(assign requirements). The use of an array is required.
Here is the code that i jot down for the last php file:
<.........
<h1>Data captured:</h1><br>
<?php
//create short variable names
$name = $_POST['name'];
$ssn=$_POST['ssn'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
?>
<?php
//$narray[0]="name"; wrong def of my array
//$narray[1]="ssn";
//$narray[2]="email";
//$narray[3]="subject";
//$narray[4]="message";
$myFile = "testFile.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
?>
<form method="post" action='p2.html' name="goBack">
<input type="submit" name="view" value="GoBack">
</form>
</body>
</html>
I am kind of confused of how i can assign an array to a variable and sort the array by one of the variables.?
GOAL: when the user clicks on the display button, the data read from the file(testfile) is sorted by SSN...
Thanks for the help.