session_start() doesn't have to be the first line in the code, but it
does have to occur before ANY content sent to the browser, and this
includes any headers as well. Generally speaking, it does no harm to
have it as the first line of your PHP code
Ash
www.ashleysheridan.co.uk
--- Begin Message ---
At 8:02 PM -0700 8/15/08, VamVan wrote:
Tedd,
I think according to PHP manual. Session_start() must be the first
line in the code. Dont worry it will remember your session until you
close the browser and also it wont duplicate it.
VamVan:
Yes, I thought that as well and practiced it for years, but that's
not true -- read the manual.
In any event, that's not the problem here.
The problem here is can I use a variable within a $_SESSION[] declaration?
Like so:
$_SESSION[$var]
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php