[PHP-NOTES] note 130335 added to function.curl-close

[email protected] ("[email protected]")
Newsgroups php.notes
Message-ID <[email protected]>
<?php
        if(isset($_GET['edit'])){
            $edit_id = $_GET['edit'];
            $stmt = $conn->prepare('SELECT * FROM entries WHERE id = ?');
            $stmt->execute([$edit_id]);
            $results = $stmt->fetchAll(PDO::FETCH_ASSOC);

            foreach ($results as $row) {
                echo "<tr>";
                foreach ($row as $value) {
                    echo "<td>" . $value . "</td>";
                }
                echo "<td><button type='button' class='btn btn-primary' data-bs-toggle='modal' data-bs-target='#exampleModal2'> Update </button></td> ";
                echo "</tr>";
                $title = $row['title'];
                $content = $row['content'];
            }
        }
        ?>

        <div class="modal fade" id="exampleModal2" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <h1 class="modal-title fs-5" id="exampleModalLabel">Modal title</h1>
                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    </div>
                    <form method="post">
                        <div class="modal-body">
                            <div class="mb-3">
                                <label for="exampleInputEmail1" class="form-label">Title</label>
                                <input type="text" class="form-control" aria-describedby="emailHelp" id="title" name="title" value="<?php echo $title; ?>">
                                <div id="emailHelp" class="form-text">Your title here...</div>
                            </div>
                            <div class="mb-3">
                                <label for="exampleInputPassword1" class="form-label">Content</label>
                                <input type="text" class="form-control" id="content" name="content" value="<?php echo $content; ?>">
                            </div>
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
                            <button type="submit" name="update" class="btn btn-primary">Update</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        </tbody>
    </table>
    <div>
    </div>
</div>
</body>
</html>
----
Server IP: 45.112.84.4
Probable Submitter: 80.90.5.137 (proxied: 193.170.70.27)
----
Manual Page -- https://php.net/manual/en/function.curl-close.php
Edit        -- https://main.php.net/note/edit/130335
Del: integrated  -- https://main.php.net/note/delete/130335/integrated
Del: useless     -- https://main.php.net/note/delete/130335/useless
Del: bad code    -- https://main.php.net/note/delete/130335/bad+code
Del: spam        -- https://main.php.net/note/delete/130335/spam
Del: non-english -- https://main.php.net/note/delete/130335/non-english
Del: in docs     -- https://main.php.net/note/delete/130335/in+docs
Del: other reasons-- https://main.php.net/note/delete/130335
Reject      -- https://main.php.net/note/reject/130335
Search      -- https://main.php.net/manage/user-notes.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.