Skip to content

We have built a user-friendly interface for a web application. It consists of a user interface and schema regarding user information.

Notifications You must be signed in to change notification settings

subirghosh77/online-chatting-system

 
 

Repository files navigation

Online Chatting System

Duration

6 month.

Technologies / Tools Used

PHP, MySQL, HTML, CSS, JavaScript, Notepad++, Apache.

Description

i. We have built a user friendly interface of a web application. It consists of a user interface and schema regarding user information.

ii The functionality of the web application are a user can use the application by easy sign up and chat with the persons who are available in the interface .

Images

Images of the projects are shown below    

Image of index page

index page

Image of login page

login page

Image of forgot password page

forgot password page

Image of available users page

available users page

Image of chat page

chat page

Code

1. HTML Code

We get senderId and reciverId by using :

<input id="sender" value="<?php echo(isset($_SESSION["userId"]))?$_SESSION["userId"]:'';?>" type="hidden" name="sender"/>

<input id="receiver" value="<?php echo(isset($row["id"]))?$row["id"]:'';?>" type="hidden" name="receiver"/>

2. Java Script Code

We send the chat of the user in chatcontentprocess.php by suing $.ajax function :

$("#send").on('click', function (e) {		
   $.ajax({
      method : 'POST',
      async : true,
      url: 'chatcontentprocess.php', 
      data: $('#frmData').serialize(),
      beforeSend : function(){
      $("#textarea").val("");
         ...
      }
   });
});

3. PHP Code

We insert all the field of tabel by using insert query :

if($_POST["content"]==null){			
   return 0;				
}else{
   $text=$_POST["content"];
   $contentQuery="insert into `chat_content` (`senderId`,`receiverId`,`content`,`current_time`) values ('".$sen."','".$rev."','".$text."',CURRENT_TIMESTAMP)";
}
$conn = mysqli_connect($servername, $username, $password, $dbName, $port);

4. Detabase Schema

Users Table : Where we store the users information .

id uname email gender phone password
1 example [email protected] m 77......89 subir
... ... ... ... ... ...

Chat Content Table : Where we store the chat of the users .

id senderId reciverId content current_time
1 2 3 hi 2020-06-21 19:13:06
... ... ... ... ...

Features

Searching a chat or users .

Team Members

https://github.com/subirghosh77 , https://github.com/sneha2245/

About

We have built a user-friendly interface for a web application. It consists of a user interface and schema regarding user information.

Topics

Resources

Stars

Watchers

Forks

Languages

  • CSS 81.5%
  • PHP 17.1%
  • JavaScript 1.1%
  • Hack 0.3%