/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 declinedate.php

  • Committer: Gustav Hatvigsson
  • Date: 2013-04-14 12:06:35 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130414120635-0r1z7vtwcc9hq7xn
made it possible to decline and accept dates

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
include "./php/db.php";
 
3
session_start();
 
4
if($_SESSION['userName']) {
 
5
  if (isset($_POST['user']) && isset($_POST['otherUser']) && isset($_POST['DeclineLunch'])
 
6
    && $_SESSION['userName'] == $_POST['user'] ) {
 
7
    $luncharray = $db->query("SELECT accepted from planLunch WHERE(user2='$user' AND user1='{$_POST['user1']}')");
 
8
    $lunchinfo = $luncharray->fetchAll();
 
9
    $lunchquery = $lunchinfo[0];
 
10
    $db->exec("UPDATE planLunch SET accepted='false'
 
11
    WHERE(user2='{$_POST['user']}' 
 
12
    AND user1='{$_POST['otherUser']}')");
 
13
    header("Location:profile.php?uid=" . $_POST['otherUser']);
 
14
  }
 
15
}
 
16
?>