<?php 
// if(isset($_POST['submitForm'])){
//     require_once '/../../db.connect.php';
//     require_once '/../../helpers/func/helper.php';

//     $new_content = $_POST["editor"];
//     $sql = "UPDATE answers  SET content = $new_content  WHERE id = $id" ;
//     if($conn->query($sql)){
//         print 'successful';
//     }else{
//         print 'unsuccessful';
//         print "Error: " . $sql . "<br>" . $conn->error;
//     }
// }
?>

<form action="" method="post">
    <div class="row">
        <div class="input-field col s12">
        <textarea name="editor" id="edit-answer-<?php print $id ?>" class="materialize-textarea" ><?php print $content ?></textarea>
        <label for="edit-answer-<?php print $id ?>">Edit Answer</label>
        </div>
    </div>
    <button type="submit" name="submitForm" class="btn">submit</button>
</form>