-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNew.php
More file actions
60 lines (54 loc) · 1.53 KB
/
New.php
File metadata and controls
60 lines (54 loc) · 1.53 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Feedback
</title>
<link rel="stylesheet" href="css/main.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="css/main_page.css" type="text/css" charset="utf-8">
<meta name="description" content="NEWS">
<meta name="keywords" content="NEWS">
<meta name="viewport" content="width=device-width, inital-scale=1">
<link href="img/sv.png" rel="shortcut icon" type="image/x-icon">
<link rel="stylesheet" href="css/font-awesome.min.css">
</head>
<body>
<?php include 'login.php' ?>
<?php session_start();
?>
<div id="wrapper">
<div id="content">
<?php include 'header.php';?>
</div>
<div >
<?php
$idn = $_GET['idn'];
$servername ='localhost';
$username='root';
$password='';
$dbname='base1';
$con= new mysqli($servername,$username,$password, $dbname);
if ($con->connect_error){
die('error');
}
$sql="SELECT * FROM news ";
$result=$con->query($sql);
if($result->num_rows>0){
while($row=$result->fetch_assoc()){
if($row['id']==$idn){
?>
<img class="cImg" src="<?php echo $row['url_image'];?>"/>
<p><?php echo $row['title']; ?></p>
<p><?php echo $row['content']; ?></p>
<?php
}}}
?>
</div>
</div>
<?php include 'scr.php';?>
</body>
<?php if (isset($_SESSION['login'])){ ?>
<?php } else{ ?>
<script src="login.js"></script>
<?php } ?>
</html>