/extremedating/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/extremedating/trunk

« back to all changes in this revision

Viewing changes to removedate.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-04-14 10:57:07 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130414105707-em0j7arcpfvhf8y9
forgotĀ theĀ file...

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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['user2remove']}' AND user1='{$_POST['user1remove']}')");
 
15
      $db->exec("DELETE FROM planLunch WHERE(user2='{$_POST['user1remove']}' AND user1='{$_POST['user2remove']}')");
 
16
      header("Location:profile.php?uid=" . $_POST['user1remove']);
 
17
  }
 
18
  header("Location:./profile.php");
 
19
}
 
20
header("Location:./");
 
21
?>