Vdocument - in - Online Chat Application Documentdocx

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 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. t 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 e!cellence to support variety of applications that make
communication much easier. Communication often comes along with
sharing information that plays an important role in today"s life where
even minute information can bring large profits. n such an environment
developers need to create a podium that enables data sharing among
groups such as in organi#ations$ 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 %&%. 'ny
application using the %&% platform simplifies the application
development in the highly distributed environment of the nternet.

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:


 )ystem * %entium + ,.- &#.
 &ard /isk * -0 B.
 1onitor * 23 +' Colour.
 4am * 32, 1b.

2.2 SOFTWARE REQUIREMENTS:

 O) * Windows 5%67
 8anguage * %&%
 Front 9nd * /reamweaver  
 Back 9nd * 5ampp server with 1y):8
 Browser * 'ny Web Browser

2.3 TECHNOLOGY USED

2.3.1 DREAMWEAVER 

/reamweaver is one of the best W;)W; editors on the market.


t is easy to use and creates great web pages. ' list of tips and tricks for 
using a very powerful web /evelopment program. ;ou should also
check out the BB9dit and &ome site tips as well$ as it"s packaged with
them. t is bettan then the previous version ./reamweaver C)< in a
head(to(head comparison.
 

Ado! D"!#$%!#&!":

t is a te!t editor and W;)W; editor for windows 1acintosh. t


is best suited to professional web /esigners or professional Web
/evelopers .

2.' DATABASE

  /atabase used for my project is 1;):8. 1;):8 is the world"s


most widely used open source relational database management system
that runs as a server providing multi(user access to a number of 
databases. 1;):8 was owned and sponsored company 1;):8 'B$
now owned by Oracle Corporation. 1;):8 is a popular choice of 
database for use in web applications$ and is a central component of the
widely used 8'1% 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.
's of =anuary ,02>$ %&% was installed on more than ,-0
million websites ?>@A of those sampled and ,.2 million web servers.
Originally created by 4asmus8erdorf in 2@@-$ the reference
implementation of %&% ?powered by the end 9ngine is now produced
 by The %&% roup. While %&% originally stood for %ersonal &ome
%age$ it now stands for %&%* &yperte!t %reprocessor$ which is
a recursive acronym.

%&% code can be simply mi!ed with &T18 code$ or it can be used in
combination with various templating engines and web frameworks. %&%
code is usually processed by a %&% interpreter$ which is usually
implemented as a web serverDs native module or a Common ateway
nterface ?C e!ecutable. 'fter the %&% code is interpreted and
e!ecuted$ the web server sends resulting output to its client$ usually in
form of a part of the generated web page E for e!ample$ %&% code can
 

generate a web pageDs &T18 code$ an image$ or some other data. %&%
has also evolved to include a command(line interface ?C8 capability
and can be used in standalone graphical applications.

SYNTA(
The following &ello world program is written in %&% code embedded in
an &T18 document*

G/OCT;%9 htmlH
htmlH
headH
titleH%&% Test6titleH
6headH
bodyH
)*+,+echoDpH&ello World6pHDI*-
6bodyH
6htmlH

&owever$ as %&% does not need to be embedded in &T18 or used with


a web server$ the simplest version of a &ello World program can be
written like this$ with the closing tag omitted as preferred in files
containing pure %&% code ?prior to %&% 3.-.0$ this short synta!
for echo? only works with the shortJopenJtag configuration setting
enabled$ while for %&% 3.-.0.

)*D&ello worldDI
 

The %&% interpreter only e!ecutes %&% code within its delimiters.
'nything outside its delimiters is not processed by %&% ?although non(
%&% te!t is still subject to control structuresdescribed in %&% code. The
most common delimiters are <?php to open and ?> to close %&%
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 ')%(style short
forms <% or <%= and %>. )hort delimiters make script files less
 portable$ since support for them can be disabled in the local %&%
configuration$ and they are therefore discouraged. The purpose of all
these delimiters is to separate %&% code from non(%&% code$ including
&T18.

The first form of delimiters$ <?php and ?>$ in 5&T18 and


other 518 documents$ creates correctly formed 518 Kprocessing
instructionsK.This means that the resulting mi!ture of %&% code and
other markup in the server(side file is itself well(formed 518.

USE OF PHP
%&% is a general(purpose scripting language that is especially
suited to server(side web development$ in which case %&% generally
runs on a web server . 'ny %&% code in a reLuested file is e!ecuted by
the %&% runtime$ usually to create dynamic web page content or 
dynamic images used on websites or elsewhere. M22-N t can also be used
 

for command(line scripting and client(side graphical user  


interface ? applications. %&% can be deployed on most web servers$
many operating systems and platforms$ and can be used with
many relational database management systems ?4/B1). 1ost web
hosting providers support %&% for use by their clients. t is available free
of charge$ and the %&% roup provides the complete source code for 
users to build$ customi#e and e!tend for their own use.

%&% acts primarily as a filter $ taking input from a file or stream


containing te!t and6or %&% instructions and outputting another stream of 
data. 1ost commonly the output will be &T18$ although it could
 be =)OP$ 518 or 
 binary data  such as image or audio formats. )ince
%&% -$ the %&% parser  compiles input to produce bytecodefor 
 processing by the end 9ngine$ giving improved performance over 
its interpreter  predecessor.

Originally designed to create dynamic web pages$ %&% 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 1icrosoftDs ')%.P9T$ )un 1icrosystemsD =ava)erver 
%ages$ and modJperl.

T,! $#/0 #d&#0#! o4 PHP +"o"#$$/0 /0567d! ,!


4o66o%/0:

O+!0 So7"5!
 

%&% is freely available for use. The community of open source %&%
developers provides technical support and is constantly improving
updating the core %&% functionalities. %&% is available at free of cost
under %&% eneral %ublic 8icense and most of its associative reLuired
softwareDs like 1y):8$ Te!t 9ditors and 'pache )erver are also freely
available$ so it proves very cost effective for the developers.

C"o8P6#4o"$ 

%&% provides high compatibility with leading operating systems and


web servers such as thereby enabling it to be easily deployed across
several different platforms. %&% scripts can run across operating systems
such as 8inu!$ Windows$ )olaris$ OpenB)/$ 1ac O)5 etc and also
 provide support for all major web servers such as 'pache$ )$ i%lanet
etc.

Po%!"

)everal web tasks can now be easily perform using %&%. For e!ample
now we can develop from small websites to giant business and
organi#ational websites$ informative forums$ chatting platforms$ C41
solutions$ e(commerce shopping carts$ community websites$ e(business$
shopping carts and gigantic database driven sites.
 

U!" F"/!0d69

/esigned in a user friendly manner$ %&% gives more fle!ibility than C$


CQQ and ')% and overall helps in increasing traffic to the site.

Q7/5 

%&% is designed to work well with the web$ and so things like accessing
the 9T and %O)T and working with &T18 and 48s are built(ins in
the %&% language. This makes it really concise and straightforward to
make a website.

E;!0/o0

Being an open source language$ a large number of libraries and


e!tensions$ to e!tend its core functionalities$ are available for download.
The source code of %&% can be modified to include custom created
e!tensions and components thereby increasing its e!tensibility.

E#9 D!+6o9$!0

There are many hosting companies that will$ for a few dollars a month$
give you a server running %&% so you can make a website really easily.
 

A7o$#/5#669 R!4"!,!

 Powadays 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.

O,!" Too6

f you need to access other web based tools like oogle maps ?which is
always advisable for a business website$ or any other$ %&% makes it
easy to access.

S!57"/9

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

T#6!0 A&#/6#/6/9

;ou can hire %&% programmers more easily than any other language
 programmers since so many people know the language.
 

3.2 INTRODUCTION TO (AMPP

(AMPP  is a free and open source cross(platform web


server solution stack package$ consisting mainly of the 'pache &TT%
)erver$ 1y):8 database$ and interpreters for scripts written in
the %&% and %erl programming languages.

5'1%%Ds name is an acronym for*

• 5 ?to be read as KcrossK$ meaning cross(platform

• 'pache &TT% )erver 

• 1y):8

• %&%

• %erl

R!<7/"!$!0 A0d F!#7"!

5'1%% reLuires only one #ip$ tar $ 7#$ or e!e file to be downloaded


and run$ and little or no configuration of the various components that
make up the web server is reLuired. 5'1%% is regularly updated to
incorporate the latest releases of 'pache$ 1y):8$ %&% and %erl. t also
 

comes with a number of other modules


including Open))8 and php1y'dmin.

)elf(contained$ multiple instances of 5'1%% can e!ist on a single


computer$ and any given instance can be copied from one computer to
another.

USE

Officially$ 5'1%%Ds 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 nternet. To make this as
easy as possible$ many important security features are disabled by
default. n practice$ however$ 5'1%% is sometimes used to actually
serve web pages on the World Wide Web.

' special tool is provided to password(protect the most important parts


of the package. 5'1%% also provides support for creating and
manipulating databases in 1y):8 and ):8ite among others.

Co$+o0!0

5'1%% 2.R.>(3 for Windows$ including*

• 'pache ,.-.20

• 1y):8 3.<.,0
 

• %&% 3.3.23

•  php1y'dmin -.,.7.2

• Fileilla FT% )erver 0.@.-2

• Tomcat 7.0.-, ?with modJpro!yJajp as connector

• )trawberry %erl 3.2<.>.2 %ortable

• 5'1%% Control %anel >.,.2 ?from hackattack2-,

5'1%% 2.R.>(3 for 8inu!$ including*

• 'pache ,.-.20

• 1y):8 3.<.,0

• %&% 3.3.23

•  php1y'dmin -.,.7.2

• Open))8 2.0.2i

3.3 INTRODUCTION TO MYSQL SERVER:

• 1y):8 is a database system used on the web

• 1y):8 is a database system that runs on a server 


 

• 1y):8 is ideal for both small and large applications

• 1y):8 is very fast$ reliable$ and easy to use

• 1y):8 supports standard ):8

• 1y):8 compiles on a number of platforms

• 1y):8 is free to download and use

• 1y):8 is developed$ distributed$ and supported by Oracle


Corporation

• 1y):8 is named after co(founder 1onty WideniusDs daughter* 1y

The data in 1y):8 is stored in tables. ' table is a collection of related


data$ and it consists of columns and rows.

PHP = M9SQL

• %&% combined with 1y):8 are cross(platform ?you can develop


in Windows and serve on a ni! platform

Q7!"/!

' Luery is a Luestion or a reLuest. We can Luery a database for specific


information and have a record set returned.

8ook at the following Luery ?using standard ):8*

)989CT 8astPame F4O1 9mployees


 

The Luery above selects all the data in the K8astPameK column from the
K9mployeesK table.

E(ISTING SYSTEM:

n our e!isting system$ %eople 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. n
telephone user can speak each other. 9(mail provides many cost
advantages when compared with the use of paper or the telephone.

DISADVANTAGES:

 &eavy work .

 8ow 1aintenance.

 &igh Cost

PROPOSED SYSTEM

C&'T 'pplication 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 eLually benefited by the
 proposed system.We are introducing a new software called C&'T
)94+94 for chatting purpose. We can say thoroughly that this software
is very useful for the college. t is mainly designed for the college to
reduce the communication gap between the different peoples in a
college.

ADVANTAGES

 &igh )ecurity

 4educe 1anual Work 

 Organi#ed Work 

SYSTEM STUDY

FEASIBLITY STUDY:

The feasibility of the project is analy#ed in this phase and business


 proposal is put forth with a very general plan for the project and some
cost estimates. /uring 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 reLuirements for the system is essential.
Three key considerations involved in the feasibility analysis are
 

♦ 9COPO1C'8 F9')B8T;

♦ T9C&PC'8 F9')B8T;

♦ )OC'8 F9')B8T;

ECONOMICAL FEASIBILITY

  This study is carried out to check the economic impact that the
system will have on the organi#ation. The amount of fund that the
company can pour into the research and development of the system is
limited. The e!penditures 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 customi#ed products had
to be purchased.

TECHNICAL FEASIBILITY

  This study is carried out to check the technical feasibility$ that


is$ the technical reLuirements of the system. 'ny 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 reLuirement$ as only minimal or null changes are reLuired
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. &is 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

 )tudent

 )taff 

 'dministrator 

 Broadcast

 1ulticast

STUDENT:
 

4egisters into the login.)earches and joins in the e!isting groups.)hares


messages$ 8inks and Files with other members of that particular 
member.

ADMIN:

+erifies the student login information and grants permission)ends user"s


 password to user"s emailverifies student name$ description and creates a
new group$ similarly searches for the member.rants the permission to
the owner of group to change group details or delete group.

STAFF:

4egisters into the login.)earches and joins in the e!isting


member.)hares messages$ 8inks 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 e!ample broadcasting 1essage passing
interface.
 

MULTICAST:
Member
n multicast ?one(to(many or many(to(many distribution Registration

is group communication where information is addressed to a group of 


destination computers f not a simultaneously.
member 
1ulticast should not be confused with physical
layer point(to(multipoint communication.

f member 

DATA FLOW DIAGRAM

User

Login
Search Member
Process
user
 

Admin

&ome page

Online
chat

Chat login page 8ist of user  +iew menber details

SYSTEM TESTING

 INTRODUCTION
 

)oftware testing is an investigation conducted to provide


stakeholders with information about the Luality of the product or service
under test.M2N )oftware 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 techniLues include$ but are
not limited to$ the process of e!ecuting a program or application with the
intent of finding software bugs ?errors or other defects.

t involves the e!ecution of a software component or system to evaluate


one or more properties of interest. n general$ these properties indicate
the e!tent to which the component or system under test*

• meets the reLuirements 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.

's 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. 's a result$
 

software testing typically ?but not e!clusively attempts to e!ecute a


 program or application with the intent of finding software bugs ?errors or 
other defects.

)oftware testing can provide objective$ independent information about


the Luality of software and risk of its failure to users and6or sponsors.

TESTING PROCESS

• 'll field entries must work properly$

• %ages must be activated from the identified link.

• The 9ntry screen$ message and response must not be delayed.

  F!#7"!

o +erify that the entries are of the correct format.

o  Po duplicate entries should be allowed.

o 'll links should take the user to the correct page.

 TYPES OF TESTING

  2. Black bo! testing


  ,. White bo! testing
 

BLAC> BO( TESTING

The techniLue of testing without having any knowledge of the


interior workings of the application is Black Bo! testing. The tester is
oblivious to the system architecture and does not have access to the
source code. Typically$ when performing a black bo! test$ a tester will
interact with the systemDs user interface by providing inputs and
e!amining outputs without knowing how and where the inputs are
worked upon.

Ad&#0#!

• Well suited and efficient for large code segments.

• Code 'ccess not reLuired.

• Clearly separates userDs perspective from the developerDs


 perspective through visibly defined roles.

• 8arge numbers of moderately skilled testers can test the application


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

D/#d&#0#!

• 8imited Coverage since only a selected number of test scenarios


are actually performed.

• nefficient 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 BO( TESTING

White bo! testing is the detailed investigation of internal logic and


structure of the code. White bo! testing is also called glass testing or 
open bo! testing. n order to perform white bo! 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 unit6chunk of the code is behaving inappropriately.

Ad&#0#!

• 's 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.

• t helps in optimi#ing the code.

• 9!tra lines of code can be removed which can bring in hidden


defects.

• /ue to the testerDs knowledge about the code$ ma!imum coverage


is attained during test scenario writing.

D/#d&#0#!
 

• /ue to the fact that a skilled tester is needed to perform white bo!
testing$ the costs are increased.

• )ometimes 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.

• t is difficult to maintain white bo! testing as the use of speciali#ed


tools like code analy#ers and debugging tools are reLuired.

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. t provides a way to check the functionality of components$ sub
assemblies$ assemblies and6or a finished product t is the process of 
e!ercising software with the intent of ensuring that the )oftware system
meets its reLuirements and user e!pectations and does not fail in an
unacceptable manner. There are various types of test. 9ach test type
addresses a specific testing reLuirement.

U0/ T!/0

  nit testing involves the design of test cases that validate that the
internal program logic is functioning properly$ and that program inputs
 produce valid outputs. 'll decision branches and internal code flow
should be validated. t 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. nit tests perform basic tests at component
level and test a specific business process$ application$ and6or system
configuration. nit tests ensure that each uniLue path of a business
 process performs accurately to the documented specifications and
contains clearly defined inputs and e!pected results.

I0!"#/o0 T!/0

  ntegration 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. ntegration tests demonstrate that although the components were
individually satisfaction$ as shown by successfully unit testing$ the
combination of components is correct and consistent. ntegration testing
is specifically aimed at e!posing the problems that arise from the
combination of components.

 F705/o0#6 T!/0

  Functional tests provide systematic demonstrations that functions


tested are available as specified by the business and technical
reLuirements$ system documentation$ and user manuals.

Functional testing is centered on the following items*


 

+alid nput * identified classes of valid input must be accepted.

nvalid nput * identified classes of invalid input must be rejected.

Functions * identified functions must be e!ercised.

Output * identified classes of application outputs must be


e!ercised.

)ystems6 %rocedures * interfacing systems or procedures must be


invoked.

  Organi#ation and preparation of functional tests is focused on


reLuirements$ key functions$ or special test cases. n addition$ systematic
coverage pertaining to identify Business process flowsI 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
customer"s needs and captures these in the reLuirements of the systemI
then the system design starts. The design spec. and implementation spec
follow capturing the data flow$ O$ important data structure and
algorithm design and finally the pseudo code for the system. 'fter all
 

that* which  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. ;es$  know this is boringG 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 Luickly find the bugs$ but you don"t want to feel this is
some sort of worthless ta! strategy imposed by the company you work
for to get code out of the door to the customer. )o once you have coded
your functions$ units$ modules$ sub(system you need to test it and find
the bugs ( they will e!istG Once you have a tested system and your
system fails ( maybe a bug not uncovered during testing ( then you need
to debug. n fact solving problems found while testing also reLuires a set
of debugging tools and strategies.

 Types of Errors
The major groups of errors found in system development are
reLuirement spec$ design spec and coding errors. n what follows$ we
discuss these common types of errors found in systems.
 

 R!<7/"!$!0 S+!5 E""o"


1any times errors creep into system development because of some
misunderstanding between what the customer wants and what the
developers deliver. These Serrors in the reLuirement phase are very
costly and typically some form of reLuirement 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. 4eLuirement reviews can
also help here. But it is important to try and identify what the systems
reLuirements are asking the designers to do and if that is indeed what the
customer wants.

 D!/0 S+!5 E""o"


'ssuming that the 4eLuirement )pec is good the ne!t set of errors
occur in the design phase. n terms of our methodology errors would be
reflected in the /esign )pec. /o not sit down and start coding once you
understand the reLuirementsI think$ abstract and write the /esign )pec.
;ou need to understand the data flow$ O$ data structures$ functional
decomposition$ pseudo code and algorithms before you write a line of 
code. f errors creep in the design stageI for e!ample$ 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 +!"4o"$#05! !""o" .
1any 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.

Cod/0 E""o"
The main error people associate with software is coding errors. We
all make coding errors. &aving a solid /esign )pec to work from that
has gone through a rigorous review helps. Translating that spec to an
mplementation )pec that we have discussed in this course is the ne!t
step. Once code is written and unit tested ?we will discuss this in the
ne!t lecture then Sdesk checking your code is your best friend ( more
on coding inspection below.

1ake believe that you are the computer e!ecuting the code line by
line ( update the data structures just like your code. )tudy the O in your 
code as you e!ecute it. ;ou will find many errors this way. 9ven better 
ask another person working in the project but not familiar with your 
code to desk check your code. )ometimes 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 e!ist. We have already designed


some simple test scripts for the crawler.

• )tabili#ation* Try and make the bugs reproducible ?what condition


causes a particular bug and is it repeatable.

• 8ocali#ation* dentify the function$ line of the code responsible.

• Correction* Fi! the code.

• +erification* Test the code fi! and confirm it works.

TEST CASES
 

FIELD?NAME VALID INPUT ERROR  REMAR>S


FORMAT MESSAGE

ser Pame Character 9rror message is ser Pame should


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

%assword Character or   9rror message is ser can either 


 Pumber  shown to the user  give character or 
if the character or   Pumber 
 Pumber is not
given properly

%hone Pumber Pumber 9rror message is %hone number  


shown to the user  should not e!ceed
if the Pumber is 20 numbers
not given properly

1emberU 'gent Character 9rror message is  Pame should be in


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

/ate of Birth U //6116;;;; 9rror message is The format should


/ate of =oin shown to the user   be followed
if the formant is
not given properly
 

CONCLUSION AND FUTURE ENHANCEMENT

 CONCLUSION

  The OP8P9 C&'T '%%8C'TOP FO4 9/C'TOP'8


P)TTTOP) was tested and found to be e!ecuted 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. /ifferent 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 organi#ations 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 reLuired to work at
College )ite. 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 %&%.

SOURCE CODE
 

USER REGISTRATION
Vphp

errorJreporting ?0I

obJstart?I

sessionJstart?I

reLuireJonce Dconfig6config.phpDI

if?isset?J%O)TMDsubmitDN

fullnameYJ%O)TMDfullnameDNI

genderYJ%O)TMDgenderDNI

usernameYJ%O)TMDusernameDNI

passwordYJ%O)TMDpassswordDNI

  insertJLueryYKinsert into ictJuser?name$gender$userJname$password

values?DfullnameD$DgenderD$DusernameD$DpasswordDIKI

result Y ZmysLlJLuery?insertJLueryI

  66Check whether the Luery was successful or not

if?result X

VH

  script languageYDjavascriptDH

alert?D4egistration successDI

window.location.href Y Klogin.phpKI
 

6scriptH

Vphp

else

echo K:uery failedKI

VH

ADMIN LOGIN PAGE


Vphp

unYJ%O)TMDanameDNI

pwYJ%O)TMDpassDNI

if ?J%O)TMKanameKN YY KadminK UU J%O)TMKpassKN YY KadminK X

sessionJstart?I

  J)9))OPMK8oginKN Y K;9)KI

  header?D8ocation*adminhome.phpDI

  [

else

X
 

echo KWrong sername and %asswordKI

echo KpHa hrefYDinde!.htmlDHback to login pageGGG6aHp6HKI

VH

DATABASE CONNECTION
Vphp

66ive your mysLl username password and database name

conYmysLliJconnect?KlocalhostK$KrootK$KK$KchatKI

if ?mysLliJconnectJerrno?

 X

  echo KFailed to connect to 1y):8* K . mysLliJconnectJerror?I

 [

VH

MEMBER LOGIN
Vphp

conYmysLliJconnect?KlocalhostK$KrootK$KK$KshareKI

66 Check connection

if ?mysLliJconnectJerrno? X

  echo KFailed to connect to 1y):8* K . mysLliJconnectJerror?I

unYJ%O)TMDusernameDNI
 

pwYJ%O)TMDpassDNI

result Y mysLliJLuery?con$K)989CT \ F4O1 ]memreg] W&949


unameYDunD 'P/ passYDpwDKI

if?mysLliJnumJrows?result YY 2

sessionJstart?I

J)9))OPMDunameDNYunI

  header?D8ocation*memberhome.phpDI

  [

else

echo Dwrong username or passwordDI

echo Da hrefYKregister.phpKHgo back6aHDI

VH

VIEW MEMBER GROUP:


Vphp

conYmysLliJconnect?KlocalhostK$KrootK$KK$KshareKI

if ?mysLliJconnectJerrno? X

  echo KFailed to connect to 1y):8* K . mysLliJconnectJerror?I


 

result Y mysLliJLuery?con$K)989CT \ F4O1 memregKI

echo Ktable borderYD2D bgcolorYD^0/C793D widthYD200ADH

trH

thH191B94 P'196thH

thHF88 P'196thH

thH91'86thH

thH/'T9 OF B4T&6thH

thH/'T9 OF =OP6thH

6trHKI

while?row Y mysLliJfetchJarray?result X

  echo KtrHKI

  echo KtdHK . rowMDunameDN . K6tdHKI

  echo KtdHK . rowMDfnameDN . K6tdHKI

  echo KtdHK . rowMDemailDN . K6tdHKI

  echo KtdHK . rowMDdobDN . K6tdHKI

  echo KtdHK . rowMDdojDN . K6tdHKI

  echo K6trHKI

echo K6tableHKI

mysLliJclose?conI
 

VH

GROUP DETAILS
Vphp

con Y mysLliJconnect?KlocalhostK$KrootK$KK$KshareKI

if?mysLliJconnectJerrno?

echo Kfailed to connectK . mysLliJerror?I

memname Y mysLliJrealJescapeJstring?con$ J%O)TMDmemnameDNI

groupname Y mysLliJrealJescapeJstring?con$ J%O)TMDgroupnameDNI

groupid Y mysLliJrealJescapeJstring?con$ J%O)TMDgroupidDNI

doc Y mysLliJrealJescapeJstring?con$ J%O)TMDdocDNI

groupdes Y mysLliJrealJescapeJstring?con$ J%O)TMDgroupdesDNI

sLl Y KP)94T PTO reg ?memname$ groupname$ groupid$


doc$groupdes +'89)?DmemnameD$ DgroupnameD$ DgroupidD$ DdocD$
DgroupdesDKI

if?GmysLliJLuery?con$sLl
X
die?D9rrror*D . mysLliJerror?conI
[
else
  echo Ksuccessfully Create groupKI

echo Da hrefYKmemberhome.phpKHo back6aHDI


 

VH

CHATING PAGE
Vphp

66 simple chat class

class )impleChat X

  66 /B variables

  var s/bPameI

  var s/bserI

  var s/b%assI

  66 constructor 

  function )impleChat? X

  66mysLlJconnect?KlocalhostK$KusernameK$KpasswordKI

  this(Hs/bPame Y DchatDI

  this(Hs/bser Y DrootDI

  this(Hs/b%ass Y DDI

  [

 66 adding to /B table posted message

  function accept1essages? X

  if ?JCOO_9MDmemberJnameDN X
 

  if?isset?J%O)TMDsJsayDN UU J%O)TMDsJmessageDN X

  ssername Y JCOO_9MDmemberJnameDNI

  66the host$ name$ and password for your mysLl

  v8ink Y mysLlJconnect?KlocalhostK$ this(Hs/bser$ this(


Hs/b%assI

  66select the database

  mysLlJselectJdb?this(Hs/bPameI

  s1essage Y mysLlJrealJescapeJstring?J%O)TMDsJmessageDNI

  if ?s1essage GY DD X

  mysLlJLuery?KP)94T PTO ]sJchatJmessages] )9T


]user]YDXssername[D$ ]message]YDXs1essage[D$
]when]YP5JT19)T'1%?KI

  [

  mysLlJclose?v8inkI

  [

  [

  obJstart?I

  reLuireJonce?DchatJinput.htmlDI

  s)houtbo!Form Y obJgetJclean?I

  return s)houtbo!FormI

  [

function get1essages? X
 

  v8ink Y mysLlJconnect?KlocalhostK$ this(Hs/bser$ this(


Hs/b%assI

  66select the database

  mysLlJselectJdb?this(Hs/bPameI

  66returning the last 23 messages

  v4es Y mysLlJLuery?K)989CT \ F4O1 ]sJchatJmessages]


O4/94 B; ]id] ')C 81T 23KI

s1essages Y DDI

 66 collecting list of messages

  if ?v4es X

  while?a1essages Y mysLlJfetchJarray?v4es X

  sWhen Y date?K&*i*sK$ a1essagesMDwhenDNI

  s1essages .Y Ddiv classYKmessageKHD . a1essagesMDuserDN .


D* D . a1essagesMDmessageDN . DspanH?D . sWhen . D6spanH6divHDI

  [

  [ else X

  s1essages Y D/B error$ create ):8 table beforeDI

  [

  mysLlJclose?v8inkI

  obJstart?I

  reLuireJonce?DchatJbegin.htmlDI

  echo s1essagesI
 

  reLuireJonce?DchatJend.htmlDI

  return obJgetJclean?I

  [

VH
 

  REFERENCES

1. %&% 36K1y):8K %rogramming for the 'bsolute Beginner by Andy

 Harris 

2. %&%* ' B9PP94D) /9 by Vikram Vaswani 

3. PHP #0d M9SQL W! D!&!6o+$!0 ', Ed//o0  by Luke

Welling and Laura Thomson

'. L!#"0/0 PHP M9SQL J#&#S5"/+ #0d CSS Boo> by Robin

 Nixon

5. H!#d F/" PHP @ M9SQL Boo 4o" B!/00!" by Lynn beighley

and Mihael Morrison

<. PHP8M9<6 by !"TA"T Aademy #uduherry


7. http*66www.w>schools.comttp*66www.%&%Tutor.com
R. http*66www.html.net6tutorials6php6inde!.html
@. http*66www.tutorialspoint.com6mysLl6
20. http*66www.mysLl.com6training6

You might also like