This is my php code, is there something wrong?
HP CODE:
<?php
include '../includes/config.php';
//SQL QUERY
$query = mysqli_query($conn, "SELECT * FROM post ORDER BY id ASC");
if (isset($_POST["submit"])) {
$title = $_POST["title"];
$description = $_POST["description"];
$article = $_POST["article"];
}
?>
//HTML
<?php if (isset($_POST["update"])) { ?>
<body>
<form method="post">
<div class="form-group">
<label for="exampleFormControlFile1">Choose the image</label>
<input type="file" class="form-control-file" id="exampleFormControlFile1">
</div>
<div class="form-group">
<label">Title</label>
<input type="text" class="form-control" name="title" placeholder="Title" <?php echo $row["title"]; ?>>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Description</label>
<input type="text" class="form-control" name="description" placeholder="Description">
</div>
<div class="form-group">
<label for="exampleFormControlTextarea1">Article</label>
<textarea class="form-control" name="article" rows="3"></textarea>
</div>
<button type="submit" class="btn btn-primary" name="submit">Post</button>
</form>
<?php if (mysqli_num_rows($query)) { ?>
<?php while ($row = mysqli_fetch_array($query)) {?>
<strong>
<h1><?php echo $row["title"]; ?></h1>
</strong>
<h3><?php echo $row["description"]; ?></h3>
<p><?php echo $row["article"]; ?></p>
<button class="btn btn-warning" name="update">
<a href="#">Update</a>
</button>
<hr />
<?php } ?>
<?php } ?>
</body>
Parse error: syntax error, unexpected end of file in C:\xampp\htdocs\my-blog\admin\includes\content\edit_article.php on line 51.
Anyone Can Help Me ? Thanks for Answering
`.
– Virb Mar 21 '18 at 04:34