<?php header('Content-Type: text/html; charset=utf-8');
require_once '../../bd/connection.php';
$lid = "3";
function pr($lid){
$sqlinwork = mysqli_query($mysqli,"INSERT INTO in_work (`lab_id`,`status`) VALUES ('$lid','новая')");
}
pr($lid);
?>
$servername = "localhost";
$username = "username";
$password = "password";
$dbname = "myDB";
$conn = mysqli_connect($servername, $username, $password, $dbname);
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
function pr($lid) {
global $conn;
mysqli_query($conn,"INSERT INTO in_work (`lab_id`,`status`) VALUES ('$lid','новая')");
}