<html> <body> <?php function addheader($page, $title) { $page .= "<html><head><title>" . $title . "</title></head><body><h1 align=\"center\">"; $page .= $title . '</h1>'; return $page; } function addfooter($page, $year, $copyright) { $page .= "<div align=\"center\">©" . $year . " " . $copyright . "</div></body></html>"; return $page; } $page = ""; $page = addheader($page, 'a procedural script'); echo $page; $page .= "<p align=\"center\">this page with generated with procedural script</p>"; $page = addfooter($page, date('Y'), 'procedural dsigns Inc'); echo $page; ?> </body> </html>
require_once 'includes/functions.php'; if (isset($_GET['level'])) { $level = mysqli_real_escape_string($db, $_GET['level']); $comp = mysqli_real_escape_string($db, $_GET['comp']); $name = mysqli_real_escape_string($db, $_GET['name']); $routine = mysqli_real_escape_string($db, $_GET['routine']); $routine = explode(',', $routine); $insert_post = mysqli_query($db, "INSERT INTO tariff_routines\n\t\t (level,comp,name,skill1,skill2,skill3,skill4,skill5,skill6,skill7,skill8,skill9,skill10) \n\tVALUES('" . $level . "','" . $comp . "','" . $name . "','" . $routine[0] . "','" . $routine[1] . "','" . $routine[2] . "','" . $routine[3] . "','" . $routine[4] . "','" . $routine[5] . "','" . $routine[6] . "','" . $routine[7] . "','" . $routine[8] . "','" . $routine[9] . "')"); if (mysqli_error($db)) { exit(mysqli_error($db)); } else { exit("Routine saved. It will appear once the webmaster approves it"); } } $title = "Tariff Calculator"; addheader(); ?> <style> #tariffCalc{ margin:0; background: #FFF; padding: 10px 20px 10px 20px; font: 1em "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow: 1px 1px 1px #FFF; border:1px solid black; border-radius: 5px; -webkit-border-radius: 5px; -moz-border-radius: 5px; position:relative; box-shadow: 3px 3px 0px 0px rgba(50, 50, 50, 0.75);