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

  • Committer: Gustav Hartvigsson
  • Date: 2013-04-15 17:15:56 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20130415171556-q5zcc5mdle93vm1q
code cleanup

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['AcceptLunch'])
 
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='true'
 
11
    WHERE(user2='{$_POST['user']}' 
 
12
    AND user1='{$_POST['otherUser']}')");
 
13
    header("Location:profile.php?uid=" . $_POST['otherUser']);
 
14
  }
 
15
}
 
16
?>