Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head> <link rel="stylesheet" text= "text/css" href="uplaod1.css"> </head>
- <body>
- <div class ="heading">
- <h2> T0 do list</h2>
- </div>
- <form method ="post" action="">
- <?php $db = mysqli_connect("localhost", "root", "root","todo") or die("QUERY failed". mysqli_error($db));?>
- <?php
- if (isset($_POST['submit'])) {
- $task = $_POST['task'];
- $query = "INSERT INTO tasks(task) VALUES('$task')";
- $run_query = mysqli_query($db,$query);
- }
- ?>
- <input type="text" name="task" class="task"/>
- <button type="submit" class= "add_btn" name"submit">Add the task</button>
- </form>
- <table>
- <thead>
- <tr>
- <th>N</th>
- <th> </th>
- <th>Tasks</th>
- <th> </th>
- <th>Action</th>
- <th> </th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>1</td>
- <td>Placeholder</td>
- <td><a href="#">X</a></td>
- </tr>
- </tbody>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement