layout)){ $WhatLayout = mysql_query("SELECT * FROM layouts WHERE `default`='yes'"); $WhatLayout = mysql_fetch_object($WhatLayout); } else{ $Layout = mysql_query("SELECT * FROM layouts WHERE `layout_name`='$WhatLayout->layout'")or die(mysql_error()); $Layout = mysql_fetch_object($Layout); $WhatLayout = $Layout; } } else{ //If the user is not logged in then it should select the default layout $WhatLayout = mysql_query("SELECT * FROM layouts WHERE `default`='yes'")or die(mysql_error()); $WhatLayout = mysql_fetch_object($WhatLayout); } define('LAYOUT',$WhatLayout->layout_name); define('LAYOUT_INCLUDE_LOC',$WhatLayout->layout_location); require_once(LAYOUT_INCLUDE_LOC.'header.php'); ?>