@@ 14-25 (lines=12) @@ | ||
11 | $this->connect = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME); |
|
12 | } |
|
13 | ||
14 | public function validateEmailInDb($email) |
|
15 | { |
|
16 | $query = "SELECT login_id FROM login WHERE email = '$email'"; |
|
17 | if ($result = $this->connect->query($query)) |
|
18 | { |
|
19 | if ($result->num_rows > 0) { |
|
20 | return 1; |
|
21 | } |
|
22 | else |
|
23 | return 0; |
|
24 | } |
|
25 | } |
|
26 | ||
27 | function validateUsernameInDb($username) |
|
28 | { |
|
@@ 27-37 (lines=11) @@ | ||
24 | } |
|
25 | } |
|
26 | ||
27 | function validateUsernameInDb($username) |
|
28 | { |
|
29 | $query = "SELECT login_id FROM login WHERE username = '$username'"; |
|
30 | if ($result = $this->connect->query($query)) { |
|
31 | if ($result->num_rows > 0) { |
|
32 | return 1; |
|
33 | } |
|
34 | else |
|
35 | return 0; |
|
36 | } |
|
37 | } |
|
38 | } |
|
39 |