header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Pragma: no-cache"); header("Content-Type: text/html; charset=UTF-8"); // Start session. session_start(); $login_required = false; // Set a key, checked in mailer, prevents against spammers trying to hijack the mailer. $_SESSION['text_value'] = 'makesuresessionsareenabled'; if ( ! isset($_SESSION['form_message'])) { $_SESSION['form_message'] = 'Fill in the form to get your DVD download!'; } // will not set footer ( or header ) in a session var if ( ! isset($_SESSION['formFooter'])) { $_SESSION['formFooter'] = ''; } // set up container array if ( ! isset($_SESSION['form'])) { $_SESSION['form'] = array(); } function check($field, $type = '', $value = '', $default = '') { $string = ''; switch($type) { case 'checkbox': if (isset($_SESSION['form'][$field])) { if(in_array($value, $_SESSION['form'][$field])) { $string = 'checked="checked"'; } }else{ // see if this is a default if(isset($default) && $default == 'checked') { $string = 'checked="checked"'; } } break; case 'multi-select': if (isset($_SESSION['form'][$field])) { if(in_array($value, $_SESSION['form'][$field])) { $string = 'selected="selected"'; } }else{ // see if this is a default if(isset($default) && $default == 'selected') { $string = 'selected="selected"'; } } break; case 'radio': if (isset($_SESSION['form'][$field])) { if($_SESSION['form'][$field] === $value) { $string = 'checked="checked"'; } }else{ if(isset($default) && $default == 'checked') { $string = 'checked="checked"'; } } break; case 'select': if (isset($_SESSION['form'][$field])) { if($_SESSION['form'][$field] === $value) { $string = 'selected="selected"'; } }else{ if(isset($default) && $default == 'selected') { $string = 'selected="selected"'; } } break; default: if(isset($default) && !isset($_SESSION['form'][$field])) { $string = $default; }else{ $string = $_SESSION['form'][$field]; } } return $string; } ?> DVD Download

Official Website of Comedian Ramon Garcia