Here is the php block before the doctype...
<?php require_once('Connections/photostudio.php'); ?>
<?php
//if (!session_id()) session_start();
if(!isset($_SESSION["gallery"])) {
$_SESSION["gallery"] = "grid_fullsize";//default value
}
if((((isset($_POST["gallerytype"]))?$_POST["gallerytype"]:"") != "")) {
$_SESSION["gallery"] = "".((isset($_POST["gallerytype"]))?$_POST["gallerytype"]:"") ."";
}
$gallery =($_SESSION['gallery']);
?>