Instead of Cookies you could use Session variables (which use cookie but are easier to implement)
ex.
1st page
session_start();
session_register("SESSION");
// Now we can just call session and use it like an array
$SESSION[0] = $field1;
$SESSION[1] = $field2;
etc....
then you to retrieve them just call back the sessions like
session_start();
session_register("SESSION"):
echo $SESSION[0];
etc...
Now storing stuff in files. Stinks that you cant use database I would just write the session variables back into the file seperated with some delimeter (like : ) I would also make it searchable by some user name or user ID.
so file would look like
userid1:blah:blah2:blah3:blah4
userid2:blah:blah2:blah3:blah4
etc....
so
write:
session_start();
session_register("SESSION");
$fp = fopen("database.dat","w+");
for($i = 0; $i < sizeof($SESSION);$i++) {
if(i != 0)
$output = $output + ":" + $SESSION[$i];
else
$output = $USERID + ":" + $SESSION[$i];
}// end for
fputs($fp,$output);
read:
// Assume you have userid for later
$file = file("database.dat");
$break = 0;
for($i = 0; $i < sizeof($file) && !$break; $i++) {
$line = $file[$i];
$array = explode(":",$line);
if ($array[0] == $USERID) {
$break = 1; // We found the record and can stop looping
}
Once we have all this info we can just read them back into some sessions or can just output them in fields.
Hope this Helps!
(Code warning: I am not perfect)