Advertisement
HelloDearSir

egu

Mar 12th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1.  
  2.  
  3.  
  4.  
  5. <html>
  6. <head> <link rel="stylesheet" text= "text/css" href="uplaod1.css"> </head>
  7. <body>
  8. <div class ="heading">
  9. <h2> T0 do list</h2>
  10. </div>
  11.  
  12. <form method ="post" action="">
  13. <?php $db = mysqli_connect("localhost", "root", "root","todo") or die("QUERY failed". mysqli_error($db));?>
  14. <?php
  15. if (isset($_POST['submit'])) {
  16. $task = $_POST['task'];
  17. $query = "INSERT INTO tasks(task) VALUES('$task')";
  18. $run_query = mysqli_query($db,$query);
  19. }
  20.  
  21. ?>
  22. <input type="text" name="task" class="task"/>
  23. <button type="submit" class= "add_btn" name"submit">Add the task</button>
  24. </form>
  25.  
  26. <table>
  27. <thead>
  28. <tr>
  29. <th>N</th>
  30. <th> </th>
  31. <th>Tasks</th>
  32. <th> </th>
  33. <th>Action</th>
  34. <th> </th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <tr>
  39. <td>1</td>
  40. <td>Placeholder</td>
  41. <td><a href="#">X</a></td>
  42. </tr>
  43. </tbody>
  44. </table>
  45. </body>
  46. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement