I am grateful to those who helped me with a setCookie() problem I thought I was having, and hope that you all can help me with my "next" problem.... perhaps this is also a simple matter of "Doh!" I'll be happy to admit it if it is!!!
For those who didn't see my previous post, here are some specifics about the environment I have set up...
My environment: WIN 2000 Pro 5.00.2195 SP2, IIS, IE 6.0, PHP 4.3.0 RC1 CGI mode, MySQL 3.23.49.
This may be one problem this may be two.... I am suspecting that I have a global settings problem or something in my php.ini file incorrect, but I'll let you be the judge....
I am following the author's code examples exactly (PHP Fast and Easy Web Development by Julie Meloni, in this case CHs 16&17). I have not had any problems with other tutorials/code examples from the book, so my general environment seems to be set up properly.
Here's my current problem: whenever I use setCookie() or session_start(), I am not able to "see" the actual cookie, etc. With session_start(), I can find the session ID listed in my directory, but running the following code doesn't seem to work:
<?
session_start();
session_register('count');
$_SESSION[count]++;
$msg = "<p>You've been here $_SESSION[count] times. Thanks!!!</p>";
?>
<html>
<head>
<title>Start a New Session</title>
</head>
<body>
<? echo "$msg"; ?>
</body>
</html>
What I expect this code to do is to echo the line "You've been here 1 times. Thanks!!!" when the page is first loaded. Then each time I force a reload I should see the number 1 [count] increment for each reload.
However, I simply see the first echo appear with [count] = 1, and the reload doesn't increment the [count]. Like I said, I check in my temp dir for the session ID and I see it there, so I am thinking there is some type of problem with my settings.
I am relating this to the overall problem I seem to be having with cookies and session ID's, as it appears at first that my php pages are working (see my previous posts to setCookie() thread) but i am unable to locate and view the actual cookie file that is created (even when I create a cookie that doesn't expire).
Is this an issue with IIS? I don't think it is my browser settings as I have the same problem with IE 6 and Mozilla. I do note one difference between the two, tho.... IE doesn't prompt me (I get prompted for all other cookies) to accept the cookie whereas Mozilla does.....
If it would help for me to post the contents of my php.ini file, let me know.
Thanks in advance!!!
ecco