Ive made this blog and I need a little help, this is the index.php where the posts are being printed, same with their images...
<?php
if (!isset($_SESSION['name'])) {
}else{
echo "<a href=\"edit.php?id=".$image."\"><strong>EDIT</strong>";
}
?>
and here is edit.php
<?php
$_GET['id']
$sql = mysql_query("SELECT * FROM BlogData id");
$row = mysql_fetch_array($sql){
$title = $row['title'];
$content = $row['content'];
$category = $row['category'];
$image = $row['id'];
$extension= $row['ext'];
?>
<center>
<form action='edit.php' method='post' enctype="multipart/form-data">
Title: <input type='text' name='title' placeholder="$title" /><br>
Date: <input type='text' name='category' placeholder="$category" /><br>
<textarea rows="10" cols="50" name='content'>$content</textarea><br>
<?php
echo "<img width='228' height='60' src='uploads/".$image.".".$extension."'>";
?>
Select image to upload:
<input type="file" name="fileToUpload" id="fileToUpload">
<br><br><br>
<input type="submit" value="edit!" name="submit">
</form>
<img src="images/tutorialpost2.jpg">
</center>
?>
So I've got this EDIT button and I want it to work. It should be able to edit all my MySQL table with the current ID. how do I do it?