/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-13 09:17:45 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130413091745-j6ehpt2wc708q5jt
added the general structure.

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['user1remove']}' AND user1='{$_POST['user2remove']}')");
15
 
      header("Location:profile.php?uid=" . $_POST['user1remove']);
16
 
      sleep(1);
17
 
  }
18
 
  header("Location:./profile.php");
19
 
}
20
 
header("Location:./");
21
 
?>