-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdetail.php
31 lines (29 loc) · 1.04 KB
/
detail.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
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
$header = 'Error based SQLi';
include("../layout/header.php");
$id = $_GET['id'];
$sql = "SELECT * FROM news WHERE id = $id";
echo '<script>console.log("' . addslashes($sql) . '"); </script>';
$result = mysqli_query($conn, $sql);
$item = mysqli_fetch_assoc($result);
?>
<div class="flex-grow-1 d-flex align-items-center flex-column ">
<div class="row justify-content-center flex-grow-1 text-center w-100">
<div class="col col-lg-8 col-md-8 col-xs-12 text-center mx-2 ">
<h3 class="mt-3 text-decoration-underline">Community News</h3>
<div class="d-flex flex-column align-items-center">
<div class="card m-2 text-start" >
<div class="card-body">
<p class="card-text">This news has <?php echo strlen($item['body']) ?> characters</p>
</div>
</div>
</div>
</div>
</div>
</div>
<?php
include("../layout/footer.php");
?>