PDO::ERRMODE_EXCEPTION )); }catch (Exception $e){ die("Error : ".$e->getMessage()); } if (isset($_GET['topic'])){ $topic_id = $_GET['topic']; $req = $db->prepare('SELECT topic_subject FROM topics WHERE id=:id'); $req->execute(array( "id"=>$topic_id )); if ($data = $req->fetch()) { $subject = $data['topic_subject']; } $req = $db->prepare('SELECT * FROM replies WHERE reply_topic=:id_topic'); $req->execute(array( "id_topic"=>$topic_id )); try { $rows = $req->fetchAll(PDO::FETCH_ASSOC); ?>
Author | Reply | Date |
---|---|---|
="$firstname $lastname ($username)"?> |
=$Parsedown->text($row['reply_content'])?> | =$row['reply_date']?> |
Subjects | Answers | Author | Creation date |
---|---|---|---|
">=$row['topic_subject']?> | ="To be completed"?> | ="$firstname $lastname ($username)"?> | =$row['topic_date']?> |