<?php
ob_start();
include 'dbconnection.php';

$m_day = $_POST['m_day'];
$monday1 = $_POST['monday1'];
$monday2 = $_POST['monday2'];
$monday3 = $_POST['monday3'];


$tu_day = $_POST['tu_day'];
$tuesday1 = $_POST['tuesday1'];
$tuesday2 = $_POST['tuesday2'];
$tuesday3 = $_POST['tuesday3'];


$w_day = $_POST['w_day'];
$wednesday1 = $_POST['wednesday1'];
$wednesday2 = $_POST['wednesday2'];
$wednesday3 = $_POST['wednesday3'];


$thu_day = $_POST['thu_day'];
$thursday1 = $_POST['thursday1'];
$thursday2 = $_POST['thursday2'];
$thursday3 = $_POST['thursday3'];


$fri_day = $_POST['fri_day'];
$friday1 = $_POST['friday1'];
$friday2 = $_POST['friday2'];
$friday3 = $_POST['friday3'];


$sat_day = $_POST['sat_day'];
$saturday1 = $_POST['saturday1'];
$saturday2 = $_POST['saturday2'];
$saturday3 = $_POST['saturday3'];

$sun_day = $_POST['sun_day'];
$sunday1 = $_POST['sunday1'];
$sunday2 = $_POST['sunday2'];
$sunday3 = $_POST['sunday3'];



$sql="UPDATE availability_time set m_day='{$m_day}',monday1='{$monday1}',monday2='{$monday2}',monday3='{$monday3}',tu_day='{$tu_day}',tuesday1='{$tuesday1}',tuesday2='{$tuesday2}',tuesday3='{$tuesday3}',w_day='{$w_day}',wednesday1='{$wednesday1}',wednesday2='{$wednesday2}',wednesday3='{$wednesday3}',thu_day='{$thu_day}',thursday1='{$thursday1}',thursday2='{$thursday2}',thursday3='{$thursday3}',fri_day='{$fri_day}',friday1='{$friday1}',friday2='{$friday2}',friday3='{$friday3}',sat_day='{$sat_day}',saturday1='{$saturday1}',saturday2='{$saturday2}',saturday3='{$saturday3}',sun_day='{$sun_day}',sunday1='{$sunday1}',sunday2='{$sunday2}',sunday3='{$sunday3}' ";



if (!mysqli_query($conn,$sql))
  {
  die('Error: ' . mysqli_error());
  }
else {
header("location:../availability_time");
}
mysqli_close($conn);
ob_end_flush();
?> 