-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathadd_player_to_selection.php
More file actions
29 lines (27 loc) · 1.23 KB
/
Copy pathadd_player_to_selection.php
File metadata and controls
29 lines (27 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?
/***************************************************************************
* add_player_to_selection.php
* ---------------------------------
* begin : Friday, May 16, 2008
* copyright : (C) 2008 J. David Baker
* email : me@jdavidbaker.com
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
include "includes/classes.inc.php";
$player_id = $_GET['player_id'];
$statement = "select * from pick where player_id = '$player_id'";
if (!mysql_num_rows(mysql_query($statement))) {
$statement = "insert into selection (player_id, team_id, selection_priority)
values ('$player_id', '".$login->team_id()."', '".time()."')";
mysql_query($statement);
}
header("Location: ".$_SERVER['HTTP_REFERER']);
?>