6 month.
PHP, MySQL, HTML, CSS, JavaScript, Notepad++, Apache.
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 of the projects are shown below
Image of index page
Image of login page
Image of forgot password page
Image of available users page
Image of chat page
1. HTML Code
We get
senderId
andreciverId
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 | gender | phone | password | |
---|---|---|---|---|---|
1 | example | example@gmail.com |
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 |
... | ... | ... | ... | ... |
Searching a chat or users .
https://github.com/subirghosh77 , https://github.com/sneha2245/