edrobinson wrote:There is not any proper way to do this - whatever suits your needs.
The second page not opening would have no effect on the code being executed.
To log to a text file do something like this:
Code: PHP
...
//Open your log file for write only access
$handle = fopen("mylog.txt", "a");
if (!$handle) die("unable to open log file.";
//Write your session variables to the log file
fwrite($handle, $_SESSION['variable1']);
fwrite($handle, $_SESSION['variable2']);
...
fwrite($handle, $_SESSION['variableN']);
//Close the file...
fclose($handle);
...
You could probably do the same thing with a CLF formatted file.
Ed
Ed,
Thank you for help in getting me over the hump. Your code isn't that far from what I had so I went digging and found that I had a permissions issue that wouldn't let me create the file in the first place. The server was rebuilt about a year ago, and some permissions evidentally didn't get set back. Now that the file is created and has the right perms all is well.
Sometimes we need someone to tell us that "it should work" so we don't get side tracked looking in the wrong place for the problem.
While I have your attention. What tools are you using to check your syntax as you enter code? php sometimes catches me with a misplaced comma, quote or other token and instead of telling me the page is not going to load, I just get the blank screen. That causes me to backtrack my code to see what "I" did wrong.
To protect myself from this, I create a copy test1 test2 test3, so I can just go back a day and pick up from where it last worked. Otherwise, I would spend the entire day entering a few lines, testing... entering a few lines, testing. That is not going to be very productive.
Thanks,
Rick