// get email if ($_POST["email"] != "N/A") { $email = format_string($_POST["email"], TRUE); } else { $email = "''"; } // get website (and validate it) if ($_POST["website"] != "http://") { // add http:// if missing if (!preg_match("=://=", $_POST["website"])) { $website = "http://" . $_POST["website"]; } else { $website = $_POST["website"]; } // validate $status = floor(php_link_check($website, TRUE) / 100); if ($status != 2 && $status != 3) { create_error("The website you entered is invalid!"); } } else { $website = ""; } // get 'other' info if ($_POST["other"] != "N/A") { $other = format_string($_POST["other"], TRUE); } else { $other = "''"; } // get day if ($_POST["day"] != "N/A") { $day = $_POST["day"];
if ($_REQUEST['action'] == 'Delete Entry') { forward(create_container('skeleton.php', 'album_delete_confirmation.php')); } $location = $_POST['location']; $email = $_POST['email']; // get website (and validate it) $website = ''; if ($_REQUEST['website'] != '') { $website = $_POST['website']; // add http:// if missing if (!preg_match('=://=', $website)) { $website = 'http://' . $website; } // validate $status = floor(php_link_check($website, true) / 100); if ($status != 2 && $status != 3) { create_error('The website you entered is invalid!'); } } $other = $_REQUEST['other']; $day = $_REQUEST['day'] != 'N/A' ? $_POST['day'] : 0; $month = $_REQUEST['month'] != 'N/A' ? $_POST['month'] : 0; $year = $_REQUEST['year'] != 'N/A' ? $_POST['year'] : 0; // check if these values are nummeric if (!is_numeric($day)) { create_error('The day has to be a number!'); } if (!is_numeric($month)) { create_error('The month has to be a number!'); }