-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathassign_task.php
More file actions
26 lines (25 loc) · 780 Bytes
/
assign_task.php
File metadata and controls
26 lines (25 loc) · 780 Bytes
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
<!--
In the name ALLAH the Beneficent , the Merciful.
-->
<?php
include "task_table.html";
$servername = "localhost";
$userr = "root";
$pas = "";
$database = "my_first_database";
$ll = mysqli_connect($servername, $userr, $pas, $database);
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$tname = $_POST['taskname'];
$tdescription = $_POST['taskdescription'];
$person_ = $_POST['person'];
if (!empty($tname) && !empty($tdescription) && !empty($person_)) {
$sqlll = "INSERT INTO `task` (`task_name`, `task_description`, `assign_to`) VALUES ('$tname', '$tdescription', '$person_')";
}
else {
echo "fill up the required fields <br>";
}
if ($ll->query($sqlll) === TRUE ) {
echo "New record created successfully";
}
}
?>