I use this function :
function edit_post($id, $title, $content, $img) {
    global $connect;
    $id = (int)$id;
    $title = mysql_real_escape_string($title);
    $content = mysql_real_escape_string(nl2br($content));
    $img = mysql_real_escape_string($img);
    $date_posted = date("Y-m-d H:i:s");
    mysqli_query($connect, "UPDATE `topics` SET
                `title` = '$title',
                `content` = '$content',
                `img` = '$img' WHERE `id` = {$id}");
}
To make an update on database ..
and call it by this :
edit_post($_GET['id'], $title, $content, $img);
but it not make the update i want to
 
    