Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if(!isset($_SESSION['sess_user_id']) || (trim($_SESSION['sess_user_id']) == '')) {
- header("location: login.php");
- exit();
- }
- $record = filter_input(INPUT_POST, 'record', FILTER_SANITIZE_NUMBER_INT);
- $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_STRING);
- $fname = filter_input(INPUT_POST, 'fname', FILTER_SANITIZE_STRING);
- $middle = filter_input(INPUT_POST, 'middle', FILTER_SANITIZE_STRING);
- $lname = filter_input(INPUT_POST, 'lname', FILTER_SANITIZE_STRING);
- $address = filter_input(INPUT_POST, 'address', FILTER_SANITIZE_STRING);
- $city = filter_input(INPUT_POST, 'city', FILTER_SANITIZE_STRING);
- $state = filter_input(INPUT_POST, 'state', FILTER_SANITIZE_STRING);
- $zip = filter_input(INPUT_POST, 'zip', FILTER_SANITIZE_STRING);
- $county = filter_input(INPUT_POST, 'county', FILTER_SANITIZE_STRING);
- $mailing = filter_input(INPUT_POST, 'mailing', FILTER_SANITIZE_STRING);
- $hphone = filter_input(INPUT_POST, 'hphone', FILTER_SANITIZE_STRING);
- $mphone = filter_input(INPUT_POST, 'mphone', FILTER_SANITIZE_STRING);
- $wphone = filter_input(INPUT_POST, 'wphone', FILTER_SANITIZE_STRING);
- $ext = filter_input(INPUT_POST, 'ext', FILTER_SANITIZE_STRING);
- $fax = filter_input(INPUT_POST, 'fax', FILTER_SANITIZE_STRING);
- $email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL);
- $ethgroup = filter_input(INPUT_POST, 'ethgroup', FILTER_SANITIZE_STRING);
- $other1 = filter_input(INPUT_POST, 'other1', FILTER_SANITIZE_STRING);
- $occupation = filter_input(INPUT_POST, 'occupation', FILTER_SANITIZE_STRING);
- $poe = filter_input(INPUT_POST, 'poe', FILTER_SANITIZE_STRING);
- $dob = filter_input(INPUT_POST, 'dob', FILTER_SANITIZE_NUMBER_INT);
- $gender = filter_input(INPUT_POST, 'gender', FILTER_SANITIZE_STRING);
- $bhv = filter_input(INPUT_POST, 'bhv', FILTER_SANITIZE_STRING);
- $mrc = filter_input(INPUT_POST, 'mrc', FILTER_SANITIZE_STRING);
- $general = filter_input(INPUT_POST, 'general', FILTER_SANITIZE_STRING);
- $evv = filter_input(INPUT_POST, 'evv', FILTER_SANITIZE_STRING);
- $allCounties = filter_input(INPUT_POST, 'allCounties', FILTER_SANITIZE_STRING);
- $fillmore = filter_input(INPUT_POST, 'fillmore', FILTER_SANITIZE_STRING);
- $johnson = filter_input(INPUT_POST, 'johnson', FILTER_SANITIZE_STRING);
- $otoe = filter_input(INPUT_POST, 'otoe', FILTER_SANITIZE_STRING);
- $richardson = filter_input(INPUT_POST, 'richardson', FILTER_SANITIZE_STRING);
- $seward = filter_input(INPUT_POST, 'seward', FILTER_SANITIZE_STRING);
- $butler = filter_input(INPUT_POST, 'butler', FILTER_SANITIZE_STRING);
- $gage = filter_input(INPUT_POST, 'gage', FILTER_SANITIZE_STRING);
- $lancaster = filter_input(INPUT_POST, 'lancaster', FILTER_SANITIZE_STRING);
- $pawnee = filter_input(INPUT_POST, 'pawnee', FILTER_SANITIZE_STRING);
- $saline = filter_input(INPUT_POST, 'saline', FILTER_SANITIZE_STRING);
- $thayer = filter_input(INPUT_POST, 'thayer', FILTER_SANITIZE_STRING);
- $cass = filter_input(INPUT_POST, 'cass', FILTER_SANITIZE_STRING);
- $jefferson = filter_input(INPUT_POST, 'jefferspm', FILTER_SANITIZE_STRING);
- $nemaha = filter_input(INPUT_POST, 'nemaha', FILTER_SANITIZE_STRING);
- $polk = filter_input(INPUT_POST, 'polk', FILTER_SANITIZE_STRING);
- $saunders = filter_input(INPUT_POST, 'saunders', FILTER_SANITIZE_STRING);
- $york = filter_input(INPUT_POST, 'york', FILTER_SANITIZE_STRING);
- $aro = filter_input(INPUT_POST, 'aro', FILTER_SANITIZE_STRING);
- $clergy = filter_input(INPUT_POST, 'clergy', FILTER_SANITIZE_STRING);
- $intskills = filter_input(INPUT_POST, 'intskills', FILTER_SANITIZE_STRING);
- $bus = filter_input(INPUT_POST, 'bus', FILTER_SANITIZE_STRING);
- $child = filter_input(INPUT_POST, 'child', FILTER_SANITIZE_STRING);
- $law = filter_input(INPUT_POST, 'law', FILTER_SANITIZE_STRING);
- $cpr = filter_input(INPUT_POST, 'cpr', FILTER_SANITIZE_STRING);
- $data = filter_input(INPUT_POST, 'data', FILTER_SANITIZE_STRING);
- $security = filter_input(INPUT_POST, 'security', FILTER_SANITIZE_STRING);
- $emergency = filter_input(INPUT_POST, 'emergency', FILTER_SANITIZE_STRING);
- $computer = filter_input(INPUT_POST, 'computer', FILTER_SANITIZE_STRING);
- $mechanical = filter_input(INPUT_POST, 'mechanical', FILTER_SANITIZE_STRING);
- $administration = filter_input(INPUT_POST, 'administration', FILTER_SANITIZE_STRING);
- $firstaid = filter_input(INPUT_POST, 'firstaid', FILTER_SANITIZE_STRING);
- $translation = filter_input(INPUT_POST, 'translation', FILTER_SANITIZE_STRING);
- $construction = filter_input(INPUT_POST, 'construction', FILTER_SANITIZE_STRING);
- $basicclean = filter_input(INPUT_POST, 'basicclean', FILTER_SANITIZE_STRING);
- $foodprep = filter_input(INPUT_POST, 'foodprep', FILTER_SANITIZE_STRING);
- $animalcare = filter_input(INPUT_POST, 'animalcare', FILTER_SANITIZE_STRING);
- $heavy = filter_input(INPUT_POST, 'heavy', FILTER_SANITIZE_STRING);
- $dataentry = filter_input(INPUT_POST, 'dataentry', FILTER_SANITIZE_STRING);
- $identification = filter_input(INPUT_POST, 'identification', FILTER_SANITIZE_STRING);
- $phone = filter_input(INPUT_POST, 'phone', FILTER_SANITIZE_STRING);
- $runner = filter_input(INPUT_POST, 'runner', FILTER_SANITIZE_STRING);
- $greeter = filter_input(INPUT_POST, 'greeter', FILTER_SANITIZE_STRING);
- $interviewer = filter_input(INPUT_POST, 'interviewer', FILTER_SANITIZE_STRING);
- $safety = filter_input(INPUT_POST, 'safety', FILTER_SANITIZE_STRING);
- $other2 = filter_input(INPUT_POST, 'other2', FILTER_SANITIZE_STRING);
- $interpt = filter_input(INPUT_POST, 'interpt', FILTER_SANITIZE_STRING);
- $cdl = filter_input(INPUT_POST, 'cdl', FILTER_SANITIZE_STRING);
- $cpryn = filter_input(INPUT_POST, 'cpryn', FILTER_SANITIZE_STRING);
- $translate = filter_input(INPUT_POST, 'translate', FILTER_SANITIZE_STRING);
- $other3 = filter_input(INPUT_POST, 'other3', FILTER_SANITIZE_STRING);
- $license1 = filter_input(INPUT_POST, 'license1', FILTER_SANITIZE_STRING);
- $verf1 = filter_input(INPUT_POST, 'verf1',FILTER_SANITIZE_NUMBER_INT);
- $num1 = filter_input(INPUT_POST, 'num1', FILTER_SANITIZE_STRING);
- $exp1 = filter_input(INPUT_POST, 'exp1', FILTER_SANITIZE_NUMBER_INT);
- $license2 = filter_input(INPUT_POST, 'license2', FILTER_SANITIZE_STRING);
- $verf2 = filter_input(INPUT_POST, 'verf2', FILTER_SANITIZE_NUMBER_INT);
- $num2 = filter_input(INPUT_POST, 'num2', FILTER_SANITIZE_STRING);
- $exp2 = filter_input(INPUT_POST, 'exp2', FILTER_SANITIZE_NUMBER_INT);
- $license3 = filter_input(INPUT_POST, 'license3', FILTER_SANITIZE_STRING);
- $verf3 = filter_input(INPUT_POST, 'verf3', FILTER_SANITIZE_NUMBER_INT);
- $num3 = filter_input(INPUT_POST, 'num3', FILTER_SANITIZE_STRING);
- $exp3 = filter_input(INPUT_POST, 'exp3', FILTER_SANITIZE_NUMBER_INT);
- $license4 = filter_input(INPUT_POST, 'license4', FILTER_SANITIZE_STRING);
- $verf4 = filter_input(INPUT_POST, 'verf4', FILTER_SANITIZE_NUMBER_INT);
- $num4 = filter_input(INPUT_POST, 'num4', FILTER_SANITIZE_STRING);
- $exp4 = filter_input(INPUT_POST, 'exp4', FILTER_SANITIZE_NUMBER_INT);
- $license5 = filter_input(INPUT_POST, 'license5', FILTER_SANITIZE_STRING);
- $verf5 = filter_input(INPUT_POST, 'verf5', FILTER_SANITIZE_NUMBER_INT);
- $num5 = filter_input(INPUT_POST, 'num5', FILTER_SANITIZE_STRING);
- $exp5 = filter_input(INPUT_POST, 'exp5', FILTER_SANITIZE_NUMBER_INT);
- $lsrd = filter_input(INPUT_POST, 'lsrd', FILTER_SANITIZE_STRING);
- $syes = filter_input(INPUT_POST, 'syes', FILTER_SANITIZE_STRING);
- $bcert = filter_input(INPUT_POST, 'bcert', FILTER_SANITIZE_STRING);
- $pauth = filter_input(INPUT_POST, 'pauth', FILTER_SANITIZE_STRING);
- $dist1 = filter_input(INPUT_POST, 'dist1', FILTER_SANITIZE_STRING);
- $tdate1 = filter_input(INPUT_POST, 'tdate1', FILTER_SANITIZE_NUMBER_INT);
- $dist2 = filter_input(INPUT_POST, 'dist2', FILTER_SANITIZE_STRING);
- $tdate2 = filter_input(INPUT_POST, 'tdate2', FILTER_SANITIZE_NUMBER_INT);
- $dist3 = filter_input(INPUT_POST, 'dist3', FILTER_SANITIZE_STRING);
- $tdate3 = filter_input(INPUT_POST, 'tdate3', FILTER_SANITIZE_NUMBER_INT);
- $dist4 = filter_input(INPUT_POST, 'dist4', FILTER_SANITIZE_STRING);
- $tdate4 = filter_input(INPUT_POST, 'tdate4', FILTER_SANITIZE_NUMBER_INT);
- $dist5 = filter_input(INPUT_POST, 'dist5', FILTER_SANITIZE_STRING);
- $tdate5 = filter_input(INPUT_POST, 'tdate5', FILTER_SANITIZE_NUMBER_INT);
- $felony = filter_input(INPUT_POST, 'felony', FILTER_SANITIZE_STRING);
- $felonys = filter_input(INPUT_POST, 'felonys', FILTER_SANITIZE_STRING);
- $ename = filter_input(INPUT_POST, 'ename', FILTER_SANITIZE_STRING);
- $erelation = filter_input(INPUT_POST, 'erelation', FILTER_SANITIZE_STRING);
- $ehphone = filter_input(INPUT_POST, 'ehphone', FILTER_SANITIZE_STRING);
- $eaddress = filter_input(INPUT_POST, 'eaddress', FILTER_SANITIZE_STRING);
- $ecity = filter_input(INPUT_POST, 'ecity', FILTER_SANITIZE_STRING);
- $ezip = filter_input(INPUT_POST, 'ezip', FILTER_SANITIZE_STRING);
- $hdyhau = filter_input(INPUT_POST, 'hdyhau', FILTER_SANITIZE_STRING);
- $bdesc = filter_input(INPUT_POST, 'bdesc', FILTER_SANITIZE_STRING);
- if ($bhv == ""){
- $bhv = "";
- }
- if ($mrc == ""){
- $mrc = "";
- }
- if ($general == ""){
- $general = "";
- }
- if ($evv == ""){
- $evv = "";
- }
- if ($allCounties == ""){
- $allCounties = "";
- }
- if ($fillmore == ""){
- $fillmore = "";
- }
- if ($johnson == ""){
- $johnson = "";
- }
- if ($otoe == ""){
- $otoe = "";
- }
- if ($richardson == ""){
- $richardson = "";
- }
- if ($seward == ""){
- $seward = "";
- }
- if ($butler == ""){
- $butler = "";
- }
- if ($gage == ""){
- $gage = "";
- }
- if ($lancaster == ""){
- $lancaster = "";
- }
- if ($pawnee == ""){
- $pawnee = "";
- }
- if ($saline == ""){
- $saline = "";
- }
- if ($thayer == ""){
- $thayer = "";
- }
- if ($cass == ""){
- $cass = "";
- }
- if ($jefferson == ""){
- $jefferson = "";
- }
- if ($nemaha == ""){
- $nemaha = "";
- }
- if ($polk == ""){
- $polk = "";
- }
- if ($saunders == ""){
- $saunders = "";
- }
- if ($york == ""){
- $york = "";
- }
- if ($aro == ""){
- $aro = "";
- }
- if ($clergy == ""){
- $clergy = "";
- }
- if ($intskills == ""){
- $intskills = "";
- }
- if ($child == ""){
- $child = "";
- }
- if ($bus == ""){
- $bus = "";
- }
- if ($law == ""){
- $law = "";
- }
- if ($cpr == ""){
- $cpr = "";
- }
- if ($data == ""){
- $data = "";
- }
- if ($security == ""){
- $security = "";
- }
- if ($emergency == ""){
- $emergency = "";
- }
- if ($computer == ""){
- $computer = "";
- }
- if ($mechanical == ""){
- $mechanical = "";
- }
- if ($administration == ""){
- $administration = "";
- }
- if ($firstaid == ""){
- $firstaid = "";
- }
- if ($faid == ""){
- $faid = "";
- }
- if ($translation == ""){
- $translation = "";
- }
- if ($construction == ""){
- $construction = "";
- }
- if ($basicclean == ""){
- $basicclean = "";
- }
- if ($foodprep == ""){
- $foodprep = "";
- }
- if ($animalcare == ""){
- $animalcare = "";
- }
- if ($heavy == ""){
- $heavy = "";
- }
- if ($dataentry == ""){
- $dataentry = "";
- }
- if ($identification == ""){
- $identification = "";
- }
- if ($phone == ""){
- $phone = "";
- }
- if ($runner == ""){
- $runner = "";
- }
- if ($greeter == ""){
- $greeter = "";
- }
- if ($interviewer == ""){
- $interviewer = "";
- }
- if ($safety == ""){
- $safety = "";
- }
- if ($tdate1 == "00-00-0000"){
- $tdate1 = "";
- }
- if ($tdate2 == "00-00-0000"){
- $tdate2 = "";
- }
- if ($tdate3 == "00-00-0000"){
- $tdate3 = "";
- }
- if ($tdate4 == "00-00-0000"){
- $tdate4 = "";
- }
- if ($tdate5 == "00-00-0000"){
- $tdate5 = "";
- }
- if ($verf1 == "00-00-0000"){
- $tverf1 = "";
- }
- if ($exp1 == "00-00-0000"){
- $exp1 = "";
- }
- if ($verf2 == "00-00-0000"){
- $tverf2 = "";
- }
- if ($exp2 == "00-00-0000"){
- $exp2 = "";
- }
- if ($verf3 == "00-00-0000"){
- $tverf3 = "";
- }
- if ($exp3 == "00-00-0000"){
- $exp3 = "";
- }
- if ($verf4 == "00-00-0000"){
- $tverf4 = "";
- }
- if ($exp4 == "00-00-0000"){
- $exp4 = "";
- }
- if ($verf5 == "00-00-0000"){
- $tverf5 = "";
- }
- if ($exp5 == "00-00-0000"){
- $exp5 = "";
- }
- $dbh = new PDO('mysql:host=localhost;dbname=petrzilk_test', 'petrzilk_dbAdmin', '');
- $stmt = $dbh->prepare("insert into VolunDB(status, fname, middle, lname, address, city, state, zip, county, mailing, hphone, mphone, wphone, ext, fax, email, ethgroup, other1, occupation, poe, dob, gender, bhv, mrc, general, evv, allCounties, fillmore, johnson, otoe, richardson, seward, butler, gage, lancaster, pawnee, saline, thayer, cass, jefferson, nemaha, polk, saunders, york, other2, aro, clergy, intskills, interpt, bus, cdl, child, law, cpr, cpryn, data, security, emergency, computer, mechanical, administration, firstaid, faid, translation, translate, construction, basicclean, foodprep, animalcare, heavy, other3, license1, verf1, num1, exp1, license2, verf2, num2, exp2, license3, verf3, num3, exp3, license4, verf4, num4, exp4, license5, verf5, num5, exp5, lsrd, syes, bcert, pauth, dataentry, identification, phone, runner, greeter, interviewer, safety, dist1, tdate1, dist2, tdate2, dist3, tdate3, dist4, tdate4, dist5, tdate5, felony, felonys, ename, erelation, ehphone, eaddress, ecity, ezip, hdyhau, bdesc, record) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
- $stmt->bindParam(1,$status);
- $stmt->bindParam(2, $fname);
- $stmt->bindParam(3, $middle );
- $stmt->bindParam(4, $lname ) ;
- $stmt->bindParam(5, $address );
- $stmt->bindParam(6, $city);
- $stmt->bindParam(7, $state);
- $stmt->bindParam(8, $zip);
- $stmt->bindParam(9, $county);
- $stmt->bindParam(10, $mailing);
- $stmt->bindParam(11, $hphone);
- $stmt->bindParam(12, $mphone);
- $stmt->bindParam(13, $wphone);
- $stmt->bindParam(14, $ext);
- $stmt->bindParam(15, $fax);
- $stmt->bindParam(16, $email);
- $stmt->bindParam(17, $ethgroup);
- $stmt->bindParam(18, $other1);
- $stmt->bindParam(19, $occupation);
- $stmt->bindParam(20, $poe);
- $stmt->bindParam(21, $dob);
- $stmt->bindParam(22, $gender);
- $stmt->bindParam(23, $bhv);
- $stmt->bindParam(24, $mrc);
- $stmt->bindParam(25, $general);
- $stmt->bindParam(26, $evv);
- $stmt->bindParam(27, $allCounties);
- $stmt->bindParam(28, $fillmore);
- $stmt->bindParam(29, $johnson);
- $stmt->bindParam(30, $otoe);
- $stmt->bindParam(31, $richardson);
- $stmt->bindParam(32, $seward);
- $stmt->bindParam(33, $butler);
- $stmt->bindParam(34, $gage);
- $stmt->bindParam(35, $lancaster);
- $stmt->bindParam(36, $pawnee);
- $stmt->bindParam(37, $saline);
- $stmt->bindParam(38, $thayer);
- $stmt->bindParam(39, $cass);
- $stmt->bindParam(40, $jefferson);
- $stmt->bindParam(41, $nemaha);
- $stmt->bindParam(42, $polk);
- $stmt->bindParam(43, $saunders);
- $stmt->bindParam(44, $york);
- $stmt->bindParam(45, $other2);
- $stmt->bindParam(46, $aro );
- $stmt->bindParam(47, $clergy);
- $stmt->bindParam(48, $intskills);
- $stmt->bindParam(49, $interpt);
- $stmt->bindParam(50, $bus);
- $stmt->bindParam(51, $cdl);
- $stmt->bindParam(52, $child);
- $stmt->bindParam(53, $law);
- $stmt->bindParam(54, $cpr);
- $stmt->bindParam(55, $cpryn);
- $stmt->bindParam(56, $data);
- $stmt->bindParam(57, $security);
- $stmt->bindParam(58, $emergency);
- $stmt->bindParam(59, $computer);
- $stmt->bindParam(60, $mechanical);
- $stmt->bindParam(61, $administration);
- $stmt->bindParam(62, $firstaid);
- $stmt->bindParam(63, $faid);
- $stmt->bindParam(64, $translation);
- $stmt->bindParam(65, $translate);
- $stmt->bindParam(66, $construction);
- $stmt->bindParam(67, $basicclean);
- $stmt->bindParam(68, $foodprep);
- $stmt->bindParam(69, $animalcare);
- $stmt->bindParam(70, $heavy);
- $stmt->bindParam(71, $other3);
- $stmt->bindParam(72, $license1);
- $stmt->bindParam(73, $verf1);
- $stmt->bindParam(74, $num1);
- $stmt->bindParam(75, $exp1);
- $stmt->bindParam(76, $license2);
- $stmt->bindParam(77, $verf2);
- $stmt->bindParam(78, $num2);
- $stmt->bindParam(79, $exp2);
- $stmt->bindParam(80, $license3);
- $stmt->bindParam(81, $verf3);
- $stmt->bindParam(82, $num3);
- $stmt->bindParam(83, $exp3 );
- $stmt->bindParam(84, $license4);
- $stmt->bindParam(85, $verf4);
- $stmt->bindParam(86, $num4);
- $stmt->bindParam(87, $exp4);
- $stmt->bindParam(88, $license5);
- $stmt->bindParam(89, $verf5);
- $stmt->bindParam(90, $num5);
- $stmt->bindParam(91, $exp5);
- $stmt->bindParam(92, $lsrd);
- $stmt->bindParam(93, $syes);
- $stmt->bindParam(94, $bcert);
- $stmt->bindParam(95, $pauth);
- $stmt->bindParam(96, $dataentry);
- $stmt->bindParam(97, $identification);
- $stmt->bindParam(98, $phone);
- $stmt->bindParam(99, $runner);
- $stmt->bindParam(100, $greeter);
- $stmt->bindParam(101, $interviewer);
- $stmt->bindParam(102, $safety);
- $stmt->bindParam(103, $dist1);
- $stmt->bindParam(104, $tdate1);
- $stmt->bindParam(105, $dist2);
- $stmt->bindParam(106, $tdate2);
- $stmt->bindParam(107, $dist3);
- $stmt->bindParam(108, $tdate3);
- $stmt->bindParam(109, $dist4);
- $stmt->bindParam(110, $tdate4);
- $stmt->bindParam(111, $dist5);
- $stmt->bindParam(112, $tdate5);
- $stmt->bindParam(113, $felony);
- $stmt->bindParam(114, $felonys);
- $stmt->bindParam(115, $ename);
- $stmt->bindParam(116, $erelation);
- $stmt->bindParam(117, $ehphone);
- $stmt->bindParam(118, $eaddress);
- $stmt->bindParam(119, $ecity);
- $stmt->bindParam(120, $ezip);
- $stmt->bindParam(121, $hdyhau);
- $stmt->bindParam(122, $bdesc);
- $stmt->bindParam(123, $uid);
- $stmt->execute();
- header("location: volunForm.php?message=volunteer successfully added.");
- echo "user was added";
- echo "\nPDOStatement::errorInfo():\n";
- $arr = $stmt->errorInfo();
- print_r($arr);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement