send_leefpatroon.php 559 Bytes
Newer Older
1
<?php
2
require_once ('./modules/sec_components/dbconnection.php');
3 4 5 6 7

if (mysqli_connect_errno()) {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

8 9
$sql = "INSERT INTO leefpatroon (StartTime, EndTime, Activity, Movement, Day, Comment) 
VALUES ('$_POST[begintijd]', '$_POST[eindtijd]', '$_POST[activiteit]', '$_POST[beweging_opties]',  '$_POST[day]', '$_POST[opmerking]')";
10

11
if (!mysqli_query($conn, $sql)) {
12 13 14 15 16 17 18 19 20
    die('Error: ' . mysqli_error($con));
} else {
    echo "Your information was added to the database";
}

mysqli_close($con);
?>