I have a general sessions question.
If I have most of my functions in a separate file called functions.php:
<?php
function one(){
foo;
}
function two(){
bar;
}
?>
And I call those functions from another page called newpage.php:
<?php
session_start();
include_once 'functions.php';
if (!POST_['submit']){
function one();
}else{
function two();
{
?>
Do I need to have a session_start on my external functions page? Or is it enough to call it once on the calling page?
If I do need start_session in my functions page, do I put it at the top? Or do I have to put it inside of each function?
<?php
function one(){
session_start();
foo;
}
function two(){
session_start();
bar;
}
?>
Does my question make any sense? 😃