-
Notifications
You must be signed in to change notification settings - Fork 0
/
editMeal.php
41 lines (36 loc) · 1.11 KB
/
editMeal.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/*
* This project is developed my SMN Shuvo
* Copyright Protected, Project must be used with proper credit *
*/
include ('connect.php');
$date = filter_input(INPUT_POST, 'Date');
$shuvo = filter_input(INPUT_POST, 'Shuvo');
$touhid = filter_input(INPUT_POST, 'Touhid');
$mahir = filter_input(INPUT_POST, 'Mahir');
$mehedi = filter_input(INPUT_POST, 'Mehedi');
$mahmud = filter_input(INPUT_POST, 'Mahmud');
$anik = filter_input(INPUT_POST, 'Anik');
$amount = filter_input(INPUT_POST, 'Amount');
$done_by = filter_input(INPUT_POST, 'done_by');
// form input section
$sql = "UPDATE `mess_manager` SET "
. "`Shuvo` = $shuvo, "
. "`Touhid` = $touhid, "
. "`Mahir` = $mahir, "
. "`Mehedi` = $mehedi, "
. "`Mahmud` = $mahmud, "
. "`Anik` = $anik, "
. "`Amount` = $amount, "
. "`done_by` = '$done_by' "
. "WHERE `mess_manager`.`Date` = $date";
if ($cnct->query($sql)){
echo "Data edited";
echo "<br> <a href='meal.php'> Click Here to See the meals </a>";
}
else {
echo "error" . $cnct->error;
}
// cloxd connection
mysqli_close($cnct);
?>