Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. <?php
  2. if(isset($_POST['listbox']) && !empty($_POST['listbox'])) {
  3. $servername = "localhost";
  4. $username = "root";
  5. $password = "0snata";
  6. $dbname = "auzvono";
  7.  
  8. // Create connection
  9. $conn = new mysqli($servername, $username, $password, $dbname);
  10. // Check connection
  11. if ($conn->connect_error) {
  12. die("Greska: " . $conn->connect_error);
  13. }
  14. $vreme = $_POST['listbox'];
  15. $query = 'DELETE FROM prof WHERE vreme="'.$vreme.'"';
  16. if($conn->query($query)) {
  17. return header('Location: index.php');
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement