Blame view

checkCreds.php 503 Bytes
bb6a08e5   Jean Wasilewski   Added full creds ...
1
2
3
4
5
6
7
8
9
  <?php
  
  if(!(isset($_GET["user"])&&isset($_GET["pass"])))
  	die("Nop");
  
  $link = mysql_connect(__MYSQL_HOSTNAME__, __MYSQL_USERNAME__, __MYSQL_PASSWORD__)
  	or die("Nop");
  
  if(!mysql_select_db('crep', $link))
f42e5a0f   Jean Wasilewski   Fixed issue with die
10
  	die('Nop');
bb6a08e5   Jean Wasilewski   Added full creds ...
11
12
13
14
15
16
17
  
  $requete = 'SELECT pk, admin FROM users WHERE username=\''.$_GET["user"].'\' AND password=\''.$_GET["password"].'\'';
  $resultat = mysql_query($requete);
  	
  if (!$resultat)
  	die("Nop");
  	
b3d7ea05   Jean Wasilewski   Minor fix
18
  if($row = mysql_fetch_assoc($resultat))
bb6a08e5   Jean Wasilewski   Added full creds ...
19
20
21
22
23
24
25
  	echo 'Yep';
  else
  	echo 'Nop';
  
  	
  mysql_close($link);
  ?>