-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvoteprocessing.php
More file actions
26 lines (23 loc) · 950 Bytes
/
voteprocessing.php
File metadata and controls
26 lines (23 loc) · 950 Bytes
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
<?php
session_start();
require 'utils.inc.php';
$filter = filterUsers(3);
if ($filter == 1) {
$Events = $_SESSION['EventsFromCampagne'];
$EventUp = $_POST['eventChoice'];
$EventChosen = GetEventFromId($EventUp);
$dbLink = mysqli_connect('mysql-e-eventio.alwaysdata.net', 'e-eventio_login', 'php123456$') or die('Erreur de connexion au serveur : ' . mysqli_connect_error());
mysqli_select_db($dbLink , 'e-eventio_sql') or die('Erreur dans la sélection de la base : ' . mysqli_error($dbLink));
$query = "UPDATE event SET jury_vote ='1' WHERE id_event='" . $EventUp . "'";
if(!($dbResult = mysqli_query($dbLink, $query)))
{
echo 'Erreur de requête<br/>';
echo 'Erreur : ' . mysqli_error($dbLink) . '<br/>';
echo 'Requête : ' . $query . '<br/>';
exit();
}
else{
$_SESSION['UpVoteJuryChange'] = 'Vous venez de voter !';
header('Location: juryVote.php');
}
}