| @@ 110-117 (lines=8) @@ | ||
| 107 | $this->key = 1; |
|
| 108 | echo "You are not registered || Error in registration2"; |
|
| 109 | } |
|
| 110 | else |
|
| 111 | { |
|
| 112 | $query = "INSERT INTO profile VALUES('$userId', 'Joined OpenChat', 'Joined OpenChat', '')"; |
|
| 113 | if(!$this->connect->query($query)) { |
|
| 114 | $this->key = 1; |
|
| 115 | echo "You are not registered || Error in registration3"; |
|
| 116 | } |
|
| 117 | } |
|
| 118 | } |
|
| 119 | } |
|
| 120 | } |
|
| @@ 33-36 (lines=4) @@ | ||
| 30 | ||
| 31 | public function userDetails($userId, $para) |
|
| 32 | { |
|
| 33 | if($para == True) |
|
| 34 | $this->query = "SELECT * from login where login_id = '$userId'"; |
|
| 35 | else |
|
| 36 | $this->query = "SELECT * from login where username = '$userId'"; |
|
| 37 | $this->result = $this->connect->query($this->query); |
|
| 38 | if($this->result->num_rows > 0) // if true |
|
| 39 | { |
|