/extremedating/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/extremedating/trunk
64 by Gustav Hatvigsson
forgot the file...
1
<?php
2
include "php/db.php";
3
session_start();
4
if(isset($_SESSION['userName'])) {
5
  if (isset($_POST['remove']) && isset($_POST['user2remove']) && isset($_POST['user1remove']) && (
6
    $_SESSION['userName'] == $_POST['user2remove'] || $_SESSION['userName'] == $_POST['user1remove'])) {
7
    $luncharray = $db->query("
8
    SELECT accepted
9
    FROM planLunch
10
    WHERE (user2='{$_POST['user2remove']}' AND user1='{$_POST['user1remove']}')
11
    OR (user2='{$_POST['user1remove']}' AND user1='{$_POST['user2remove']}');"
12
    );
13
echo "aoeu";
14
      $db->exec("DELETE FROM planLunch WHERE(user2='{$_POST['user1remove']}' AND user1='{$_POST['user2remove']}')");
15
      header("Location:profile.php?uid=" . $_POST['user1remove']);
65 by Gustav Hatvigsson
made it possible to decline and accept dates
16
      sleep(1);
64 by Gustav Hatvigsson
forgot the file...
17
  }
18
  header("Location:./profile.php");
19
}
20
header("Location:./");
21
?>