<?php

if (!empty($_POST['name']) && !empty($_POST['face']) && !empty($_POST['INN']) && !empty($_POST['Bik']) && !empty($_POST['Rs']) && !empty($_POST['address'])) {
    require_once '../classes/crud.php';
    $dbObject = new crud();
    $dbObject->create('organizations');
}
Example #2
0
include '../includes/form_validation_includes.php';
?>
	<style type="text/css">
	@import url("/css/main-css.css")
        </style>
<?php 
include_once '../mysql/hidden_files/database.php';
include_once '../classes/class.goals.crud.php';
$crud = new crud($conn);
if (isset($_POST['btn-save'])) {
    $user_id = $_POST["uid"];
    $username = $_POST['username'];
    $timeframe = $_POST['timeframe'];
    $goal = nl2br2($_POST['goal']);
    $actions = nl2br2($_POST['actions']);
    if ($crud->create($user_id, $username, $timeframe, $goal, $actions)) {
        //header("Location: ../mysql/add_goals.php?inserted");
        ?>
       <script> location.replace("../mysql/add_goals.php?inserted"); </script>?<?php 
    } else {
        ?>
       <script> location.replace("../mysql/add_goals.php?failure"); </script>?<?php 
    }
}
?>
  
 </head>
  
  <body >
    
 
<?php

session_start();
$workerId = $_SESSION['workerId'];
if (!empty($_POST)) {
    require_once 'classes/crud.php';
    $dbObject = new crud('tasks');
    $_POST['idfrom'] = $workerId;
    $_POST['opened'] = 1;
    $_POST['cond'] = 1;
    $dbObject->create();
}
<?php

if (!empty($_POST['name']) && !empty($_POST['unit']) && !empty($_POST['priceOfUnit'])) {
    require_once '../classes/crud.php';
    $dbObject = new crud();
    $dbObject->create('services');
}