PDA

View Full Version : Need some help with sessions


HormonX
11-13-2002, 07:05 PM
Can start session withing an if statement ?

here is an example:



if(something)
{
session_start();
}
else(something)
{
some code
}
<html>
<body>


I don't think i can start a session within HTML tags .... or can i ?

Thanx

HormonX

Nightfire
11-13-2002, 07:49 PM
session_start has to be before any html is parsed, and yes you can start the session in an if statement.