-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.php
63 lines (59 loc) · 1.51 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
<!--
* Author : Rohit Shakya
* Date : June-2020
* Editor : Sublime text
* Local server: Xampp
* Title : Blog posting site featuring with Weather and News report
* Version: v5.4
-->
<?php
session_start();
include 'functions.php';
if (isset($_POST['submit'])) {
insert();
}
include 'nav.php';
?>
<div class="alert alert-success">
<div class="container">
<h2><strong>Welcome!!
<?php
if(!isset($_SESSION['username']))
{
header('Location: home1.html');
}
else
{
echo ucfirst($_SESSION['username']);
}
?>
</h2>
<p>"You are successfully authenticated!!"</p><?php echo $_SESSION['msg']."<br>";?></strong>
<a href='user.php?clearAll=true'>Delete All</a>
</div></h2></div>
<!--alert box over-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<hr>
<div class="info">
<label for="example">Add Commment
</label>
<!--<form action="comment.php" method="post" onsubmit="alert('Commment posted successfully!')"> for alert on submission-->
<form action="user.php" method="post">
<label>Title</label>
<input id="example" type="text" name="title" style="border: 1px solid #F2F2F2;">
<textarea placeholder="Write your comment here!" class="pb-cmnt-textarea" name="desc"></textarea>
<input id=sent type="submit" name="submit">
</form>
</div>
</div>
<div class="container-fluid" id="Commments">
<?php
showComment(); // call the function
if (isset($_GET['clearAll'])) {
deleteFunction();
}
?>
</div>
</body>
</html>