| @@ 58-61 (lines=4) @@ | ||
| 55 | $login_id = (int)$fetch['login_id']; |
|
| 56 | ||
| 57 | // Unique Identifier |
|
| 58 | if($login_id > $userId) |
|
| 59 | $identifier = $userId.':'.$login_id; |
|
| 60 | else |
|
| 61 | $identifier = $login_id.':'.$userId; |
|
| 62 | ||
| 63 | $query = "SELECT total_messages from total_message where identifier = '$identifier'"; |
|
| 64 | if($result = $this->connect->query($query)) |
|
| @@ 36-39 (lines=4) @@ | ||
| 33 | $identifier = $msg->name; |
|
| 34 | $receiverID = $identifier; //stores id of the person whom message is to be sent |
|
| 35 | ||
| 36 | if($identifier > $userId) // geneate specific unique code to store messages |
|
| 37 | $identifier = $userId . ":" . $identifier; |
|
| 38 | else |
|
| 39 | $identifier = $identifier . ":" . $userId; |
|
| 40 | ||
| 41 | $reply = addslashes(trim($msg->reply[0])); // stores the message sent by the user. |
|
| 42 | ||