Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require 'dbh.php';
- $id = $_SESSION['id'];
- if (!$_SESSION['prijava'] == 1 ) {
- $_SESSION['poruka'] = "Moras se prvo prijaviti";
- header("Location: ../logovan.php");
- }
- else{
- $sql = "UPDATE radnovreme SET vremeOdjave = CURRENT_TIME() WHERE idKorisnika = '$id'";
- if ($conn->query($sql)){
- session_unset();
- session_destroy();
- header("Location: ../index.php");
- }else{
- $_SESSION['poruka'] = "Query nije uspeo";
- header("Location: ../logovan.php");
- }
- }
- ?>p
Add Comment
Please, Sign In to add comment