33% found this document useful (3 votes)
3K views

Online Chat Application Document

This document provides an introduction and overview of an online chat application being developed for educational institutions. It discusses the purpose of creating an interactive platform to decrease communication gaps between students and faculty. It then outlines the hardware and software requirements for the project, including the use of PHP and MySQL as the programming language and database. Finally, it provides details on PHP as the backend language, including its syntax, uses, and advantages such as being open source, cross-platform, powerful, user-friendly, quick, extensible, and providing security.

Uploaded by

Vijay Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
33% found this document useful (3 votes)
3K views

Online Chat Application Document

This document provides an introduction and overview of an online chat application being developed for educational institutions. It discusses the purpose of creating an interactive platform to decrease communication gaps between students and faculty. It then outlines the hardware and software requirements for the project, including the use of PHP and MySQL as the programming language and database. Finally, it provides details on PHP as the backend language, including its syntax, uses, and advantages such as being open source, cross-platform, powerful, user-friendly, quick, extensible, and providing security.

Uploaded by

Vijay Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 48

CHAPTER 1

INTRODUCTION
ABSTRACT
Online chat application for educational institution like Chat application
is an online system created for the number of members to connect with
each other over the World Wide Web. This project resolves almost all the
restrictions of the traditional program. Both the students and instructors
and the company are similarly helped by the suggested project. This chat
application helps you to save a lot of persistence for both. This
new application is known as Facebook or myspace like chat for inner
communicating factors. We can say thoroughly that this application is
very useful for the various higher education students. It is mainly
developed for the higher education students to decrease the interaction
gap between the different individuals in a various college atmosphere.

ABOUT THE PROJECT

The prominence and fame of computers is brought about by


its

excellence

to

support

variety

of

applications

that

make

communication much easier. Communication often comes along with


sharing information that plays an important role in todays life where
even minute information can bring large profits. In such an environment
developers need to create a podium that enables data sharing among
groups such as in organizations, communities, hospitals, schools or
universities etc. very painless. For any data sharing the most significant
scheme is to provide no loss of data which is shored up by PHP. Any
application using the PHP platform simplifies the application
development in the highly distributed environment of the Internet.
The system is designed to develop an interactive atmosphere that helps
in group creation, enables information share and also group destruction
when the group is not in use. This system is used for developing generic
applications which are user-friendly and secure too.

CHAPTER 2

SYSTEM REQUIREMENT
2.1 HARDWARE REQUIREMENTS:

System
: Pentium IV 2.4 GHz.
Hard Disk
: 40 GB.
Monitor : 15 VGA Colour.
Ram
: 512 Mb.

2.2 SOFTWARE REQUIREMENTS:

OS
Language
Front End
Back End
Browser

:
:
:
:
:

Windows XP/7
PHP
Dreamweaver
Xampp server with MySQL
Any Web Browser

2.3 TECHNOLOGY USED


2.3.1 DREAMWEAVER
Dreamweaver is one of the best WYSIWYG editors on the market.
It is easy to use and creates great web pages. A list of tips and tricks for
using a very powerful web Development program. You should also
check out the BBEdit and Home site tips as well, as its packaged with
them. It is bettan then the previous version .Dreamweaver CS6 in a
head-to-head comparison.

Adobe Dreamweaver:
It is a text editor and WYSIWYG editor for windows Macintosh. It
is best suited to professional web Designers or professional Web
Developers.

2.4 DATABASE
Database used for my project is MYSQL. MYSQL is the worlds
most widely used open source relational database management system
that runs as a server providing multi-user access to a number of
databases. MYSQL was owned and sponsored company MYSQL AB,
now owned by Oracle Corporation. MYSQL is a popular choice of
database for use in web applications, and is a central component of the
widely used LAMP open source web application software stack.

CHAPTER 3
ABOUT THE SOFTWARE

3.1 INTRODUCTION TO PHP


PHP is a server-side scripting language designed for web
development but also used as a general-purpose programming language.
As of January 2013, PHP was installed on more than 240
million websites (39% of those sampled) and 2.1 million web servers.
Originally

created

by RasmusLerdorf in

1994,

the reference

implementation of PHP (powered by the Zend Engine) is now produced


by The PHP Group. While PHP originally stood for Personal Home
Page, it now stands for PHP: Hypertext Preprocessor, which is
a recursive acronym.
PHP code can be simply mixed with HTML code, or it can be used in
combination with various templating engines and web frameworks. PHP
code is usually processed by a PHP interpreter, which is usually
implemented as a web server's native module or a Common Gateway
Interface (CGI) executable. After the PHP code is interpreted and
executed, the web server sends resulting output to its client, usually in
form of a part of the generated web page for example, PHP code can

generate a web page's HTML code, an image, or some other data. PHP
has also evolved to include a command-line interface (CLI) capability
and can be used in standalone graphical applications.

SYNTAX
The following Hello world program is written in PHP code embedded in
an HTML document:
<!DOCTYPE html>
<html>
<head>
<title>PHP Test</title>
</head>
<body>
<?phpecho'<p>Hello World</p>';?>
</body>
</html>
However, as PHP does not need to be embedded in HTML or used with
a web server, the simplest version of a Hello World program can be
written like this, with the closing tag omitted as preferred in files
containing pure PHP code (prior to PHP 5.4.0, this short syntax
for echo() only works with the short_open_tag configuration setting
enabled, while for PHP 5.4.0.
<?='Hello world';

The PHP interpreter only executes PHP code within its delimiters.
Anything outside its delimiters is not processed by PHP (although nonPHP text is still subject to control structuresdescribed in PHP code). The
most common delimiters are <?php to open and ?> to close PHP
sections. <script language="php"> and </script> delimiters
are also available, as are the shortened forms <? or <?= (which is used
to echo back a string or variable) and ?> as well as ASP-style short
forms <% or <%= and %>. Short delimiters make script files less
portable, since support for them can be disabled in the local PHP
configuration, and they are therefore discouraged. The purpose of all
these delimiters is to separate PHP code from non-PHP code, including
HTML.
The

first

form

of

delimiters, <?php and ?>,

in XHTML and

other XML documents, creates correctly formed XML "processing


instructions".This means that the resulting mixture of PHP code and
other markup in the server-side file is itself well-formed XML.

USE OF PHP
PHP is a general-purpose scripting language that is especially
suited to server-side web development, in which case PHP generally
runs on a web server. Any PHP code in a requested file is executed by
the PHP runtime, usually to create dynamic web page content or
dynamic images used on websites or elsewhere.[114] It can also be used

for command-line scripting

and client-side graphical

user

interface (GUI) applications. PHP can be deployed on most web servers,


many operating

systems and platforms,

and

can

be

used

with

many relational database management systems (RDBMS). Most web


hosting providers support PHP for use by their clients. It is available free
of charge, and the PHP Group provides the complete source code for
users to build, customize and extend for their own use.
PHP acts primarily as a filter, taking input from a file or stream
containing text and/or PHP instructions and outputting another stream of
data. Most commonly the output will be HTML, although it could
be JSON, XML orbinary data such as image or audio formats. Since
PHP

4,

the

PHP parser compiles input

to

produce bytecodefor

processing by the Zend Engine, giving improved performance over


its interpreter predecessor.
Originally designed to create dynamic web pages, PHP now focuses
mainly on server-side scripting, and it is similar to other server-side
scripting languages that provide dynamic content from a web server to
a client, such as Microsoft's ASP.NET, Sun Microsystems' JavaServer
Pages, and mod_perl.

The main advantages of PHP programming include the


following:
Open Source

PHP is freely available for use. The community of open source PHP
developers provides technical support and is constantly improving
updating the core PHP functionalities. PHP is available at free of cost
under PHP General Public License and most of its associative required
software's like MySQL, Text Editors and Apache Server are also freely
available, so it proves very cost effective for the developers.

Cross-PlatformI
PHP provides high compatibility with leading operating systems and
web servers such as thereby enabling it to be easily deployed across
several different platforms. PHP scripts can run across operating systems
such as Linux, Windows, Solaris, OpenBSD, Mac OSX etc and also
provide support for all major web servers such as Apache, IS, iPlanet
etc.

Power
Several web tasks can now be easily perform using PHP. For example
now we can develop from small websites to giant business and
organizational websites, informative forums, chatting platforms, CRM
solutions, e-commerce shopping carts, community websites, e-business,
shopping carts and gigantic database driven sites.

User Friendly
Designed in a user friendly manner, PHP gives more flexibility than C,
C++ and ASP and overall helps in increasing traffic to the site.

Quick
PHP is designed to work well with the web, and so things like accessing
the GET and POST and working with HTML and URLs are built-ins in
the PHP language. This makes it really concise and straightforward to
make a website.

Extensions
Being an open source language, a large number of libraries and
extensions, to extend its core functionalities, are available for download.
The source code of PHP can be modified to include custom created
extensions and components thereby increasing its extensibility.

Easy Deployment
There are many hosting companies that will, for a few dollars a month,
give you a server running PHP so you can make a website really easily.

Automatically Refreshes
Nowadays developing dynamic websites are in the huge demand due to
its specific characteristics like it automatically refreshes and does not
need to make much changes manually.

Other Tools
If you need to access other web based tools like Google maps (which is
always advisable for a business website), or any other, PHP makes it
easy to access.

Security
PHP offers security as well that helps prevent malicious attacks. These
security levels can be adjusted in the .ini file.

Talent Availability
You can hire PHP programmers more easily than any other language
programmers since so many people know the language.

3.2 INTRODUCTION TO XAMPP


XAMPP

is

a free

and

open

source cross-platform web

server solution stack package, consisting mainly of the Apache HTTP


Server, MySQL database,

and interpreters for

scripts

written

in

the PHP and Perl programming languages.


XAMPP's name is an acronym for:

X (to be read as "cross", meaning cross-platform)

Apache HTTP Server

MySQL

PHP

Perl

Requirements And Features


XAMPP requires only one zip, tar, 7z, or exe file to be downloaded
and run, and little or no configuration of the various components that
make up the web server is required. XAMPP is regularly updated to
incorporate the latest releases of Apache, MySQL, PHP and Perl. It also

comes

with

number

of

other

modules

including OpenSSL and phpMyAdmin.


Self-contained, multiple instances of XAMPP can exist on a single
computer, and any given instance can be copied from one computer to
another.

USE
Officially, XAMPP's designers intended it for use only as a development
tool, to allow website designers and programmers to test their work on
their own computers without any access to the Internet. To make this as
easy as possible, many important security features are disabled by
default. In practice, however, XAMPP is sometimes used to actually
serve web pages on the World Wide Web.
A special tool is provided to password-protect the most important parts
of the package. XAMPP also provides support for creating and
manipulating databases in MySQL and SQLite among others.

Components
XAMPP 1.8.3-5 for Windows, including:

Apache 2.4.10

MySQL 5.6.20

PHP 5.5.15

phpMyAdmin 4.2.7.1

FileZilla FTP Server 0.9.41

Tomcat 7.0.42 (with mod_proxy_ajp as connector)

Strawberry Perl 5.16.3.1 Portable

XAMPP Control Panel 3.2.1 (from hackattack142)

XAMPP 1.8.3-5 for Linux, including:

Apache 2.4.10

MySQL 5.6.20

PHP 5.5.15

phpMyAdmin 4.2.7.1

OpenSSL 1.0.1i

3.3 INTRODUCTION TO MYSQL SERVER:


MySQL is a database system used on the web
MySQL is a database system that runs on a server

MySQL is ideal for both small and large applications


MySQL is very fast, reliable, and easy to use
MySQL supports standard SQL
MySQL compiles on a number of platforms
MySQL is free to download and use
MySQL is developed, distributed, and supported by Oracle
Corporation
MySQL is named after co-founder Monty Widenius's daughter: My
The data in MySQL is stored in tables. A table is a collection of related
data, and it consists of columns and rows.

PHP + MySQL
PHP combined with MySQL are cross-platform (you can develop
in Windows and serve on a Unix platform)

Queries
A query is a question or a request. We can query a database for specific
information and have a record set returned.
Look at the following query (using standard SQL):
SELECT LastName FROM Employees

The query above selects all the data in the "LastName" column from the
"Employees" table.

EXISTING SYSTEM:
In our existing system, People communicated with one another using
post, email, phone, facebook, etc. But based on time consuming the new
device and software are introduced to communicate with each other.
Through post people can communicate with each other using letter. In
telephone user can speak each other. E-mail provides many cost
advantages when compared with the use of paper or the telephone.

DISADVANTAGES:
Heavy work .
Low Maintenance.
High Cost

PROPOSED SYSTEM
CHAT Application is an online system developed for the group of
members to communicate with each other over the internet. This system
solves almost all the limitations of the conventional system.Both the

students and teachers and the company are equally benefited by the
proposed system.We are introducing a new software called CHAT
SERVER for chatting purpose. We can say thoroughly that this software
is very useful for the college. It is mainly designed for the college to
reduce the communication gap between the different peoples in a
college.

ADVANTAGES
High Security
Reduce Manual Work
Organized Work

SYSTEM STUDY
FEASIBLITY STUDY:
The feasibility of the project is analyzed in this phase and business
proposal is put forth with a very general plan for the project and some
cost estimates. During system analysis the feasibility study of the
proposed system is to be carried out. This is to ensure that the proposed
system is not a burden to the company. For feasibility analysis, some
understanding of the major requirements for the system is essential.
Three key considerations involved in the feasibility analysis are

ECONOMICAL FEASIBILITY
TECHNICAL FEASIBILITY
SOCIAL FEASIBILITY

ECONOMICAL FEASIBILITY
This study is carried out to check the economic impact that the
system will have on the organization. The amount of fund that the
company can pour into the research and development of the system is
limited. The expenditures must be justified. Thus the developed system
as well within the budget and this was achieved because most of the
technologies used are freely available. Only the customized products had
to be purchased.

TECHNICAL FEASIBILITY
This study is carried out to check the technical feasibility, that
is, the technical requirements of the system. Any system developed must
not have a high demand on the available technical resources. This will
lead to high demands on the available technical resources. This will lead
to high demands being placed on the client. The developed system must
have a modest requirement, as only minimal or null changes are required
for implementing this system.

SOCIAL FEASIBILITY
The aspect of study is to check the level of acceptance of the
system by the user. This includes the process of training the user to use
the system efficiently. The user must not feel threatened by the system,

instead must accept it as a necessity. The level of acceptance by the users


solely depends on the methods that are employed to educate the user
about the system and to make him familiar with it. His level of
confidence must be raised so that he is also able to make some
constructive criticism, which is welcomed, as he is the final user of the
system.

IMPLEMENTATION:
MODULES:
For this application the modules are divided between student and
staff on the basis of permissions that are given to them for
manipulating the member.
This includes three modules
Student
Staff
Administrator
Broadcast
Multicast

STUDENT:

Registers into the login.Searches and joins in the existing groups.Shares


messages, Links and Files with other

members of that particular

member.

ADMIN:
Verifies the student login information and grants permissionSends users
password to users emailverifies student name, description and creates a
new group, similarly searches for the member.Grants the permission to
the owner of group to change group details or delete group.

STAFF:
Registers

into

the

login.Searches

and

joins

in

the

existing

member.Shares messages, Links and Files with other members of that


particular member.

BROADCAST:
Broadcasting refers to a method of transferring a message to all
recipients simultaneously. Broadcasting can be performed as a high level
operation in a program, for example broadcasting Message passing
interface.

MULTICAST:
In multicast (one-to-many or many-to-many distribution)

Member
Registration

is group communication where information is addressed to a group of


destination

computers

Multicast

should

not

be

layer

point-to-multipoint

If not a
member

simultaneously.
confused with physical
communication.

If member

DATA FLOW DIAGRAM


User

Login
Search
Process
user

Member

Admin

Home page

Online
chat

Chat login page

List of user

View menber details

SYSTEM TESTING
INTRODUCTION

Software testing is an investigation conducted to provide


stakeholders with information about the quality of the product or service
under test.[1] Software testing can also provide an objective, independent
view of the software to allow the business to appreciate and understand
the risks of software implementation. Test techniques include, but are
not limited to, the process of executing a program or application with the
intent of finding software bugs (errors or other defects).
It involves the execution of a software component or system to evaluate
one or more properties of interest. In general, these properties indicate
the extent to which the component or system under test:

meets the requirements that guided its design and development,

responds correctly to all kinds of inputs,

performs its functions within an acceptable time,

is sufficiently usable,

can be installed and run in its intended environments, and

achieves the general result its stakeholders desire.

As the number of possible tests for even simple software components is


practically infinite, all software testing uses some strategy to select tests
that are feasible for the available time and resources. As a result,

software testing typically (but not exclusively) attempts to execute a


program or application with the intent of finding software bugs (errors or
other defects).
Software testing can provide objective, independent information about
the quality of software and risk of its failure to users and/or sponsors.

TESTING PROCESS
All field entries must work properly,
Pages must be activated from the identified link.
The Entry screen, message and response must not be delayed.

Features
o Verify that the entries are of the correct format.
o No duplicate entries should be allowed.
o All links should take the user to the correct page.

TYPES OF TESTING
1. Black box testing
2. White box testing

BLACK BOX TESTING


The technique of testing without having any knowledge of the
interior workings of the application is Black Box testing. The tester is
oblivious to the system architecture and does not have access to the
source code. Typically, when performing a black box test, a tester will
interact with the system's user interface by providing inputs and
examining outputs without knowing how and where the inputs are
worked upon.
Advantages

Well suited and efficient for large code segments.

Code Access not required.

Clearly separates user's perspective from the developer's


perspective through visibly defined roles.

Large numbers of moderately skilled testers can test the application


with no knowledge of implementation, programming language or
operating systems.

Disadvantages

Limited Coverage since only a selected number of test scenarios


are actually performed.

Inefficient testing, due to the fact that the tester only has limited
knowledge about an application.

Blind Coverage, since the tester cannot target specific code


segments or error prone areas.
The test cases are difficult to design.

WHITE BOX TESTING


White box testing is the detailed investigation of internal logic and
structure of the code. White box testing is also called glass testing or
open box testing. In order to perform white box testing on an
application, the tester needs to possess knowledge of the internal
working of the code.
The tester needs to have a look inside the source code and find out
which unit/chunk of the code is behaving inappropriately.

Advantages

As the tester has knowledge of the source code, it becomes very


easy to find out which type of data can help in testing the application
effectively.
It helps in optimizing the code.

Extra lines of code can be removed which can bring in hidden


defects.

Due to the tester's knowledge about the code, maximum coverage


is attained during test scenario writing.

Disadvantages

Due to the fact that a skilled tester is needed to perform white box
testing, the costs are increased.

Sometimes it is impossible to look into every nook and corner to


find out hidden errors that may create problems as many paths will go
untested.

It is difficult to maintain white box testing as the use of specialized


tools like code analyzers and debugging tools are required.

TESTING STRATEGIES
The purpose of testing is to discover errors. Testing is the process
of trying to discover every conceivable fault or weakness in a work
product. It provides a way to check the functionality of components, sub
assemblies, assemblies and/or a finished product It is the process of
exercising software with the intent of ensuring that the Software system
meets its requirements and user expectations and does not fail in an
unacceptable manner. There are various types of test. Each test type
addresses a specific testing requirement.

Unit Testing
Unit testing involves the design of test cases that validate that the
internal program logic is functioning properly, and that program inputs
produce valid outputs. All decision branches and internal code flow
should be validated. It is the testing of individual software units of the
application .it is done after the completion of an individual unit before

integration. This is a structural testing, that relies on knowledge of its


construction and is invasive. Unit tests perform basic tests at component
level and test a specific business process, application, and/or system
configuration. Unit tests ensure that each unique path of a business
process performs accurately to the documented specifications and
contains clearly defined inputs and expected results.

Integration Testing
Integration tests are designed to test integrated software
components to determine if they actually run as one program. Testing is
event driven and is more concerned with the basic outcome of screens or
fields. Integration tests demonstrate that although the components were
individually satisfaction, as shown by successfully unit testing, the
combination of components is correct and consistent. Integration testing
is specifically aimed at

exposing the problems that arise from the

combination of components.

Functional Testing
Functional tests provide systematic demonstrations that functions
tested are available as specified by the business and technical
requirements, system documentation, and user manuals.
Functional testing is centered on the following items:

Valid Input

: identified classes of valid input must be accepted.

Invalid Input

: identified classes of invalid input must be rejected.

Functions

: identified functions must be exercised.

Output

: identified classes of application outputs must be

exercised.
Systems/ Procedures : interfacing systems or procedures must be
invoked.
Organization and preparation of functional tests is focused on
requirements, key functions, or special test cases. In addition, systematic
coverage pertaining to identify Business process flows; data fields,
predefined processes, and successive processes must be considered for
testing. Before functional testing is complete, additional tests are
identified and the effective value of current tests is determined.

THE ART OF DEBUGGING


The development of good code usually follows the design
methodology we have discussed in class: first you understand the
customers needs and captures these in the requirements of the system;
then the system design starts. The design spec. and implementation spec
follow capturing the data flow, IO, important data structure and
algorithm design and finally the pseudo code for the system. After all

that: which I typically think of as the thinking about the problem and
using abstraction (data structure design), comes the coding phase. Once
you have written code you need to test it. Yes, I know this is boring! But
unit testing, sub-system testing, system testing and finally integration
testing are a really important part of the life cycle of good software
development.
There is a tension to consider when testing - you want a set of tools
that help you quickly find the bugs, but you dont want to feel this is
some sort of worthless tax strategy imposed by the company you work
for to get code out of the door to the customer. So once you have coded
your functions, units, modules, sub-system you need to test it and find
the bugs - they will exist! Once you have a tested system and your
system fails - maybe a bug not uncovered during testing - then you need
to debug. In fact solving problems found while testing also requires a set
of debugging tools and strategies.

Types of Errors
The major groups of errors found in system development are
requirement spec, design spec and coding errors. In what follows, we
discuss these common types of errors found in systems.

Requirement Spec Errors


Many times errors creep into system development because of some
misunderstanding between what the customer wants and what the
developers deliver. These errors in the requirement phase are very
costly and typically some form of requirement analysis may catch them
but your very best programmer has little chance of discovering these
types of errors in the software life-cycle. That is right even your very
best programmers will write the wrong code. Requirement reviews can
also help here. But it is important to try and identify what the systems
requirements are asking the designers to do and if that is indeed what the
customer wants.

Design Spec Errors


Assuming that the Requirement Spec is good the next set of errors
occur in the design phase. In terms of our methodology errors would be
reflected in the Design Spec. Do not sit down and start coding once you
understand the requirements; think, abstract and write the Design Spec.
You need to understand the data flow, IO, data structures, functional
decomposition, pseudo code and algorithms before you write a line of
code. If errors creep in the design stage; for example, if the code is to
design a search on a large volume of data the data structures which look
functionally correct may impede performance - maybe a hash table
would be the best choice. This issue relates to performance errors.
Many types of design errors can occur and misunderstandings between

software engineers in the design phase can be helped with writing good
clear specs that people read and discuss in detail in design reviews
before a line of code is written.

Coding Errors
The main error people associate with software is coding errors. We
all make coding errors. Having a solid Design Spec to work from that
has gone through a rigorous review helps. Translating that spec to an
Implementation Spec that we have discussed in this course is the next
step. Once code is written and unit tested (we will discuss this in the
next lecture) then desk checking your code is your best friend - more
on coding inspection below.
Make believe that you are the computer executing the code line by
line - update the data structures just like your code. Study the IO in your
code as you execute it. You will find many errors this way. Even better
ask another person working in the project but not familiar with your
code to desk check your code. Sometimes errors can be staring you in
the face and a fresh set of eyes can pick those pesky bugs out. The take
home is that you do not need a computer to find bugs.

General Debugging Techniques


When tracking down pesky bugs we can think of the following steps to
finding them:

Testing: Finding out what bugs exist. We have already designed


some simple test scripts for the crawler.
Stabilization: Try and make the bugs reproducible (what condition
causes a particular bug and is it repeatable).
Localization: Identify the function, line of the code responsible.
Correction: Fix the code.
Verification: Test the code fix and confirm it works.

TEST CASES

FIELD_NAME

User Name

Password

VALID INPUT

ERROR

REMARKS

FORMAT

MESSAGE

Character

Error message is
shown to the user
if the character is
not given properly

Character
Number

User Name should


be in character

or Error message is User


shown to the user give

can

either

character or

if the character or Number


Number

is

not

given properly
Phone Number

Number

Error message is Phone

number

shown to the user should not exceed


if the Number is 10 numbers
not given properly
Member&

Agent Character

Name

Error message is Name should be in


shown to the user character
if the character is
not given properly

Date of Birth & DD/MM/YYYY

Error message is The format should

Date of Join

shown to the user be followed


if the formant is
not given properly

CONCLUSION AND FUTURE ENHANCEMENT


CONCLUSION
The ONLINE CHAT APPLICATION FOR EDUCATIONAL
INSTITUTIONS was tested and found to be executed successfully. The
objective of the system is achieved and problems are solved. The
package is developed in a manner that it is user friendly and appropriate
search mechanisms. The project can be effortlessly used in the process
of decision making. Different types of reports can be fabricated which
help the management to take correct decision and condense the time
delay which automatically increases the output the rate at which the
navigation comes about.
The application can be used by organizations such as colleges or
companies in an intranet environment and in mailing applications i.e. the
internet environment. to facilitate data sharing among such groups. This
application is well designed in a case that new modules need to be added
they can be done without doubt and without disturbing the older
modules.

FUTURE ENHANCEMENT
The project has met the standards required to work at
College Site. The project can be used as an availability to develop a
project for a different company with different business logic where in
the commonalties in certain areas remains the same at any business
level. By using the common features in future development the
development time as well as the cost of development can be decreased
considerably. This web application has been incorporated using PHP.

SOURCE CODE

USER REGISTRATION
<?php
error_reporting (0);
ob_start();
session_start();
require_once 'config/config.php';
if(isset($_POST['submit']))
{
$fullname=$_POST['fullname'];
$gender=$_POST['gender'];
$username=$_POST['username'];
$password=$_POST['passsword'];
$insert_query="insert into ict_user(name,gender,user_name,password)
values('$fullname','$gender','$username','$password');";
$result = @mysql_query($insert_query);
//Check whether the query was successful or not
if($result) {
?>
<script language='javascript'>
alert('Registration success');
window.location.href = "login.php";

</script>
<?php
}
else
{
echo "Query failed";
}
}
?>

ADMIN LOGIN PAGE


<?php
$un=$_POST['aname'];
$pw=$_POST['pass'];
if ($_POST["aname"] == "admin" && $_POST["pass"] == "admin") {
session_start();
$_SESSION["Login"] = "YES";
header('Location:adminhome.php');
}
else
{

echo "Wrong Username and Password";


echo "<p><a href='index.html'>back to login page!!!</a><p/>";
}
?>

DATABASE CONNECTION
<?php
//Give your mysql username password and database name
$con=mysqli_connect("localhost","root","","chat");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
?>

MEMBER LOGIN
<?php
$con=mysqli_connect("localhost","root","","share");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$un=$_POST['username'];

$pw=$_POST['pass'];
$result = mysqli_query($con,"SELECT * FROM `memreg` WHERE
uname='$un' AND
pass='$pw'");
if(mysqli_num_rows($result) == 1)
{
session_start();
$_SESSION['uname']=$un;
header('Location:memberhome.php');
}
else
{
echo 'wrong username or password';
echo '<a href="register.php">go back</a>';
}
?>

VIEW MEMBER GROUP:


<?php
$con=mysqli_connect("localhost","root","","share");
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();

}
$result = mysqli_query($con,"SELECT * FROM memreg");
echo "<table border='1' bgcolor='#0DC7E5' width='100%'>
<tr>
<th>MEMBER NAME</th>
<th>FULL NAME</th>
<th>EMAIL</th>
<th>DATE OF BIRTH</th>
<th>DATE OF JOIN</th>
</tr>";
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['uname'] . "</td>";
echo "<td>" . $row['fname'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['dob'] . "</td>";
echo "<td>" . $row['doj'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);

?>

GROUP DETAILS
<?php
$con = mysqli_connect("localhost","root","","share");
if(mysqli_connect_errno())
{
echo "failed to connect" . mysqli_error();
}
$memname = mysqli_real_escape_string($con, $_POST['memname']);
$groupname = mysqli_real_escape_string($con, $_POST['groupname']);
$groupid = mysqli_real_escape_string($con, $_POST['groupid']);
$doc = mysqli_real_escape_string($con, $_POST['doc']);
$groupdes = mysqli_real_escape_string($con, $_POST['groupdes']);
$sql = "INSERT INTO reg (memname, groupname, groupid,
doc,groupdes) VALUES('$memname', '$groupname', '$groupid', '$doc',
'$groupdes')";
if(!mysqli_query($con,$sql))
{
die('Errror:' . mysqli_error($con));
}
else
echo "successfully Create group";
echo '<a href="memberhome.php">Go back</a>';

?>

CHATING PAGE
<?php
// simple chat class
class SimpleChat {
// DB variables
var $sDbName;
var $sDbUser;
var $sDbPass;
// constructor
function SimpleChat() {
//mysql_connect("localhost","username","password");
$this->sDbName = 'chat';
$this->sDbUser = 'root';
$this->sDbPass = '';
}
// adding to DB table posted message
function acceptMessages() {
if ($_COOKIE['member_name']) {

if(isset($_POST['s_say']) && $_POST['s_message']) {


$sUsername = $_COOKIE['member_name'];
//the host, name, and password for your mysql
$vLink = mysql_connect("localhost", $this->sDbUser, $this>sDbPass);
//select the database
mysql_select_db($this->sDbName);
$sMessage = mysql_real_escape_string($_POST['s_message']);
if ($sMessage != '') {
mysql_query("INSERT INTO `s_chat_messages` SET
`user`='{$sUsername}', `message`='{$sMessage}',
`when`=UNIX_TIMESTAMP()");
}
mysql_close($vLink);
}
}
ob_start();
require_once('chat_input.html');
$sShoutboxForm = ob_get_clean();
return $sShoutboxForm;
}
function getMessages() {

$vLink = mysql_connect("localhost", $this->sDbUser, $this>sDbPass);


//select the database
mysql_select_db($this->sDbName);
//returning the last 15 messages
$vRes = mysql_query("SELECT * FROM `s_chat_messages`
ORDER BY `id` ASC LIMIT 15");
$sMessages = '';
// collecting list of messages
if ($vRes) {
while($aMessages = mysql_fetch_array($vRes)) {
$sWhen = date("H:i:s", $aMessages['when']);
$sMessages .= '<div class="message">' . $aMessages['user'] .
': ' . $aMessages['message'] . '<span>(' . $sWhen . ')</span></div>';
}
} else {
$sMessages = 'DB error, create SQL table before';
}
mysql_close($vLink);
ob_start();
require_once('chat_begin.html');
echo $sMessages;

require_once('chat_end.html');
return ob_get_clean();
}
}
?>

REFERENCES

1. PHP 5/"MySQL" Programming for the Absolute Beginner by Andy


Harris
2. PHP: A BEGINNER'S GUIDE by Vikram Vaswani
3. PHP and MySQL Web Development 4th Edition by Luke
Welling and Laura Thomson
4. Learning PHP MySQL JavaScript and CSS BooK by Robin
Nixon
5. Head First PHP & MySQL Book for Beginner by Lynn beighley
and Michael Morrison
6. PHP-Mysql by ICTACT Academy Puducherry
7. http://www.w3schools.comttp://www.PHPTutor.com
8. http://www.html.net/tutorials/php/index.html
9. http://www.tutorialspoint.com/mysql/
10.
http://www.mysql.com/training/

You might also like