/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: Daniel Johansson
  • Date: 2013-04-13 09:30:20 UTC
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: maila@danieljohansson.nu-20130413093020-s4t7ci899tigorea
Added csses, index.php and image folder

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
 
?>