Hi there.
I've tryed everything, but still nothing happens. I don't know what could be wrong...
I've tryed runing php as an executable in dos-mode and i think that everything works ok. But nothing apperars on the browser except a msg saying: The page cannote be diplayed.... please try the following.... bla, bla, bla.
Here's a exemple of my short script.
<?php session_start();
print($counter);
$counter++;
session_register("counter");
?>
Thanks a lot for any help.
Bye.
Frank Seesink wrote:
Hmmm, this sounds familiar. This error may be generated by your web browser, and IT may be doing so due to the following.
Do you have ANY text appearing on the webpage prior to calling session_start()? I ask this because it is VERY important. Sessions are, by default, based on the use of cookies. Cookies are created by putting information in the header of the HTML file being returned to a browser. Header information (like using the header() function in PHP) MUST be created before ANY other information in the HTML file is output, including the tag.
For example,
File1.PHP == BAAAAAADDDD
<? session_start(); ?>
File2.PHP == GOOOOODDDD
<? session_start(); ?>
It's a fine point, but seems to nail just about everyone when they first start working with sessions/cookies/headers. Note even having just whitespace above the initial <? can be enough to cause this.
If this isn't the case, write back and we'll see if....