colonymech / docs / www / colonyscout / internal / admin / checkuser.php @ f59acf11
History | View | Annotate | Download (575 Bytes)
1 |
<?php
|
---|---|
2 |
include($_SERVER['DOCUMENT_ROOT']."/control/do_login.php"); |
3 |
doDB("dshope_robotics");
|
4 |
|
5 |
if (isset($_GET['u'])) { |
6 |
$userName = addslashes($_GET['u']); |
7 |
} |
8 |
|
9 |
//check if username is already in use
|
10 |
$verify_account_sql = "SELECT id FROM members WHERE userName = '".$userName."'"; |
11 |
$verify_account_res = mysqli_query($mysqli, $verify_account_sql) or die(mysqli_error($mysqli)); |
12 |
|
13 |
if (mysqli_num_rows($verify_account_res) > 0) { |
14 |
//this username address is already registered, so can't use
|
15 |
echo 0; |
16 |
} else {
|
17 |
echo 1; |
18 |
} |
19 |
|
20 |
mysqli_free_result($verify_account_res);
|
21 |
exit;
|
22 |
|
23 |
?>
|