-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.php
81 lines (56 loc) · 1.56 KB
/
user.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
include 'homepageDB/config.php';
$con=new mysqli($dbservername,$dbusername,$dbpassword,$dbname);
if (isset($_POST['addtolist'])){
$Task = $_POST['task'];
$Time = $_POST['time2'];
$sql= "INSERT INTO task (task,time2) values('$Task','$Time')";
$result=mysqli_query($con,$sql);
if($result){
//echo "Data inserted successfully";
header('location:dis.php');
}else{
die(mysqli_error($con));
}
}
?>
<html>
<head>
<title>
RemindMe!
</title>
<link rel="stylesheet" href="todo.css"/>
</head>
<body class="bgcolor">
<header>
<h1>RemindMe!</h1>
</header>
<nav>
<ul>
<li class="it"><a href="home.html">Home</a></li>
<li> <a href="calandar.html">calander</a></li>
<li><a href="user.php">To-Do</a></li>
<li><a href="contactus.html">Contact Us</a></li>
<li><a href="faq.html">FAQ</a></li>
</ul>
</nav>
<div class ="task" >
<table-caption>Add Task</table-caption>
</div>
<form method="POST">
<div class="name">
<label for="tname">Task:</label>
<input type="text" id="Task" name="task" autocomplete="off">
</div>
<br>
<div class="time">
<label for="time">Time:</label>
<input type="text" id="Time" name="time2" autocomplete="off">
</div>
<button id="addtolist" name="addtolist">Add To List</button>
</form>
</body>
<footer>
<p>RemindMe!,copyright ©2023</p>
</footer>
</html>