-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnotesondb.php
More file actions
executable file
·73 lines (65 loc) · 1.52 KB
/
notesondb.php
File metadata and controls
executable file
·73 lines (65 loc) · 1.52 KB
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
<?php
include 'con.inc.php';
$data=new database();
$data->connect();
?>
<!DOCTYPE html>
<html>
<style>
.city
{
background-color: #80d4ff;
color: black;
padding: 30px;
border-radius:300px;
font-size: 30px
}
body
{
background-image: url(http://c8.alamy.com/comp/J5GW7T/online-courses-sign-on-white-paper-man-hand-holding-paper-with-text-J5GW7T.jpg);
background-size: 100%;
background-repeat: no-repeat;
background-color: #ffffff ;
}
.head{
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;font-size:60px;border-radius:300px
}
</style>
<body>
<?php
SESSION_START();
if(isset($_SESSION['username']))
{
echo '<center><h1 class="head">Notes</h1> </center>';
if(isset($_GET['cid']))
{
$cid=$_GET['cid'];
$query = "SELECT * FROM `notes` WHERE cid=$cid";
$result = mysqli_query($data->con,$query);
while ($row = mysqli_fetch_assoc($result))
{
$name = $row['nname'];
$nid = $row['nid'];
echo "<center><h2 class='city'><a href='showpdf.php?nid=$nid' style='color:black' >".$name."</a></h2></center>";
}
}
}
else
{
//$username=$_SESSION['username'];
echo "<script language='javascript' type='text/javascript'>";
echo "alert('First SignUp buddy -_-');";
echo "</script>";
$URL="index.php";
echo "<script>location.href='$URL'</script>";
}
?>
</body>
</html>