100% found this document useful (1 vote)
184 views51 pages

ONLINE SHARE TRADING SYSTEM - Ajmal

The document is a project report for an online share trading system. It discusses developing a system to automate the operations of a share brokerage firm, allowing users to view share prices and trade shares online through national stock exchanges. It outlines the hardware and software requirements including Windows 11, PHP 5.6, and MySQL 5.6. It also describes key features of the technologies used like PHP being open source and focused on server-side scripting, and MySQL being a popular open source database management system.

Uploaded by

Naasif M
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
100% found this document useful (1 vote)
184 views51 pages

ONLINE SHARE TRADING SYSTEM - Ajmal

The document is a project report for an online share trading system. It discusses developing a system to automate the operations of a share brokerage firm, allowing users to view share prices and trade shares online through national stock exchanges. It outlines the hardware and software requirements including Windows 11, PHP 5.6, and MySQL 5.6. It also describes key features of the technologies used like PHP being open source and focused on server-side scripting, and MySQL being a popular open source database management system.

Uploaded by

Naasif M
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/ 51

ONLINE SHARE TRADING SYSTEM

PROJECT REPORT

Project Submitted to the Bharathiar University in partial fulfilment of


the requirements for the Award of the Degree of

BACHELOR OF SCIENCE IN COMPUTER SCIENCE


BY
MUHAMMED AJMAL . A
(REG.NO.1922K2615)

Under the guidance of


Dr.MANIMARAN
ASSITANT PROFESSOR

DEPARTMENT OF COMPUTER SCIENCE

MAY-202

1
CERTIFICATE

This is to certify that the project report entitled “ONLINE SHARE TRADING” is a
bonafide record done by
MR.MUHAMMED AJMAL.A (Reg. No: 1922K2615) during the period of 2020-2021
of his study in the Department of Computer Science at Sri Krishna Adithya College of Arts
and Science, Coimbatore affiliated to Bharathiar University, in partial fulfilment of the
requirements for the award of the Degree of Bachelor of Science in Computer Science
under my supervision and guidance

The project work is an original work of the candidate and to the best of my
knowledge has not been submitted, in part or in full, for any Diploma / Degree /
Associateship / Fellowship or other similar titles in this or any other University. No portion
of the dissertation is a reproduction from any other source, published or unpublished,
without acknowledgment.

SIGNATURE OF THE GUIDE

SIGNATURE OF THE HOD SIGNATURE OF THE CANDITATE


MR.MUHAMMED AJMAL
(1922K2615)

Viva–Voice conducted on:

INTERNAL EXAMINER EXTERNAL EXAMINER

2
DECLARATION
I hereby declare that the project work entitled “ONLINE SHARE TRADING” Submitted
to Sri Krishna Adithya College of Arts and Science, Coimbatore, Affiliated to Bharathiar
University in partial fulfillment of the requirements for the award of the Degree of Bachelor
of Science in Computer Science is a record of original work done by me during 2020-2021
under the supervision and guidance of DR.MANIMARAN MCA.,MPhil.,Ph.D, Assistant
Professor, Department of Computer Science. The report has not been submitted for the
award of any Degree / Diploma / Associate ship /Fellowship.

DATE : SIGNATURE OF THE CANDIDATE

MUHAMMED AJMAL .A
(1922K2615)

3
ACKNOWLEDGEMENT

First and foremost, I thank the almighty through whom all things are possible. My
work would not be possible without the gift’s god gave me.

The success of the project depends upon the efforts invested. It’s my duty to
acknowledge and thank the individuals who has contributed towards the successful
completion of my dissertation.

I would like to express my whole hearted thanks to Smt.S.Malarvizhi, Chairperson


& Managing Trustee, Sri Krishna Institutions, Coimbatore.

I take this opportunity to express my profound and whole hearted thanks to our
Principal Dr. S.Palaniammal, M.Sc., M.Phil., Ph.D., Sri Krishna Adithya College of Arts
and Science for reinforcing my effort with support and guidance.

I owe my heart and profound gratitude to Dr. K. Geetha, M.Sc., M.Phil., SET., Ph.D
Head, Department of Computer Science and my internal guide Dr.S.Thilagavathi
MCA.,MPhil.,Ph.D, Assistant Professor, Department of Computer Science , Sri Krishna
Adithya College of Arts and Science, Coimbatore for giving continuous encouragement to
complete this work. This project wouldn’t be a success for me without their valuable
comments and suggestions.

I am grateful to thank all the Faculty Members in our department for their motivation
and endless inspiration to help in completing this project work.

The successful completion of my project would not have been possible without my
parent’s support. I take this opportunity to thank very much for their continuous
encouragement. I convey my thankfulness to all my friends who were with me to share my
happiness and agony

4
SYNOPSIS

Android operating System has become more popular and it makes a platform and holds a
maximum number of Users when compared to all other platform. The main Objective of this
application is used for Students and Teachers to read about Journals, Magazines and Novels.
A reader's journal helps students to pause and reflect, ask questions, and connect ideas
based upon their reading.

It is a tool to help you become a more engaged reader. It also acts as a focus for personal
ideas you may want to remember for discussing in class, working on a project, or taking a
test. It allows the user to log in using username and password. The android online book
application for Journals and Novels also the review management system project is to
implement a android-based online book review system. This android application is
combination of the system design Book reviews, and to develop a customer android-based
Review Management system.

5
CONTENTS

CERTIFICATE

DECLARATION

ACKNOWLEDGEMENT

CONTENT

SYNPOSIS

1. INTRODUCTION

1.1 ABOUT THE PROJECT

2. SYSTEM SPECIFICATION

2.1 HARDWARE SPECIFICATION

2.2 SOFTWARE SPECIFICATION

2.3 SOFTWARE FEATURES

3. SYSTEM ANALYSIS

3.1 EXISTING SYSTEM

3.2 PROPOSED SYSTEM

4. PROJECT DESCRIPTION

4.1 MODULE DESCRIPTION

5. SYSTEM DESIGN

5.1 INPUT DESIGN

5.2 OUTPUT DESIGN

5.3 DATABASE DESIGN


6
5.4 DATA FLOW DIAGRAM

6. SYSTEM TESTING AND IMPLEMENTATION

6.1 TESTING AND METHODOLOGIES

6.2 VALIDATION

6.3 IMPLEMENTATION

7. CONCLUSION

FUTURE ENHANCEMENT

8. BIBLOGRAPY
BOOKS REFERED

7
INTRODUCTION

ABOUT THE PROJECT

Online share trading system is developed for the share brokerage firm in the process of their
activities to automate their operations. The system is dealing with the selling and buying the
shares. Online brokers allow one to buy and sell shares via Internet. This system helps the
user to view detailed information about all the shares in their place and trade according to
their convenience. The user can obtain the current values of all the available shares in the
market and this in turn helps the user to sell their shares or to buy new shares in NSE
(National Stock Exchange) and in BSE (Bombay Stock Exchange) or in MSE (Madras Stock
Exchange)

8
2.SYSTEM SPECIATION

2.1 HARDWARE SPECIFICATION

System : 10th Gen Intel(R) Core(TM) i3-1135G7 @ 2.40GHz 2.40 GHz

Hardware : 500 GB

Monitor : 15 VGA ColourMouse :Logitech

Ram : 4.00 GB

2.2 SOFTWARE SPECIFICATION

Operatingsystem : Window 11

FrontEnd : PHP Version 5.6

BackEnd : MySQL Version 5.6

Server : WAMPP

9
2.3 SOFTWARE FEATURES

PHP:
The original release of PHP was designed by Rasmus Ledorfback in the middle of the 90s as
a way of making various common web tasks easier and less respective. Back then, the main
goal was to have the minimum amount of logic as was possible in order to achiveresults,and
this led to PHP begine HTML -centric-that is, PHP code was embedded inside HTML.

 PHP stands for PHP: HypertextPre-Processor


 PHP is a server-side scriptinglanguage
 PHP scripts are executed on theserver
 PHP supports many databases (MYSQL, Iformix,
Oracle,Sybase, Solids, PostgreSQL, Generic
ODBC,etc.)

 PHP is an open sourcesoftware.


 PHP is free to download and use.

PHP is mainly focused on server-side scripting, such as form data ,dynamic page content,
or send and receive cookies. But PHP can do much more PHP is a widely-used Open Source
general-purpose scripting language that is especially suited for web development and can
be embedded into HTML. PHP can be used on all major operating system, including Linux,
many UNIX variants(including HP-UX, Solaris and Opens), Microsoft Windows, Mac OS
X,RISC OS, and probably others. PHP has also support for most of the web servers today.

This includes Apache, Microsoft Internet Information Server,Personal WebServer


Netscape and iPlanet servers, orielly Website Pro server, Caladium, Xitami, OmniHTTPd, and
many others.MYSQL DATABASE SERVERMySQL, the most popular Open Source database
management System, is developed, distributed, and supported by My SQL AB is a
commercial company, founded by the My SQL developers that build sits business by
providing services around the MySQL database management System.

The MySQL Web site (https://www.mysql.com) provides the attest information about
MySQL software and MySQL AB. MySQL is a database management System

The My SQL Database Server:

10
The MySQL Database server is very fast, reliable, and easy to use. If that is what we
are looking for, we should give it try, MySQL Server also has a practical set of features
developed in close cooperation withusers.MySQL Server was originally developed to handle
large database much faster than existing solutions and has been successfully used in highly
demanding production environments for several years. Though under constant
development, MySQL Server today offers a rich and useful set of functions.

Its connectivity, Speed, and security make MySQL Server highly suited for accessing
Database on the internet.The MySQL Database Software is a Client/Server System that
consists of a multithreaded SQL server that supports different backend, several different
client programs and libraries, administrative tools, and a wide range of application
programming interfaces(APIs).MySQL Server provides a multi-threaded library which you
can link into your application to get a smaller, faster, easier-to-manage product there is a
large amount of contributed MySQL Software available. It is very likely that you will find that
your favourite application or language already supports the My sql data sever

11
3.SYSTEM ANALYSIS
System analysis is a process of collecting factual data, understanding the processes
involved, identifying problems and recommending feasible suggestions for improving the
system functioning. This involves the business processes gathering operational data,
understanding the information flow, finding out bottlenecks and evolving solutions for
overcoming the weakness of the system so as to achieve the organizational goals.

3.1 EXISTING SYSTEM

A stock exchange is the market place where companies are listed and where the
trading happens. If a person wants to buy or sell a share, he has to contact a broker.Each
Stock exchange has a limited set of brokers and these brokers contact each other using
trading terminals to find out who is interested in the share we want to buy or sell. Brokers
have terminals linked to the NSE, the BSE or the MSE and they directly Purchase or sell
shares using these terminals. The stock exchange keeps a note of these transactions and at
the end of the day starts a process of settlement. It ensures that the shares bought by the
customer. Each and every transaction is done manually. Here user has to go to share
broker’s office. Shares kept as document papers.

LIMITATION OF EXISTING SYSTEM

 Inconvenient to go to share broker’s office and to trade.


 Time Consumming
 Record maintenance
 Tedious process
 Financial delay.
 Forget of shares is possible.

12
3.2 PROPOSED SYSTEM

The proposed system is the website through which an authorized user can trade.He
can view detailed information about all the shares in his place and trade according to his
convenience. The user can obtain the current values of all shares available in the market and
this in turn helps the user to sell his shares or to buy new shares. Sensex graph of market
and company show the financial strength of the company and trend of the market. Shares
are kept in electronic format using demate account. Security is tightened. Money
transaction is done online.

ADVANTAGES OF PROPOSED SYSTEM

 Transactions carried out online


 Time saving.
 Computerized record maintenance
 User friendly
 Updates the user with current market value.
 No transaction delay.
 Negligible paper flow.
 All time access facilility.
 Security issues are high.

13
4.PROJECT DESCRIPTION

The Online share trading system includes several modules .They are described below

As follow.

 Stock Exchange Module.


 Customer information Module
 Investment Information Module

 Bank Transaction Module

 Trade Management Module

 Brokerage Module

4.1 MODULE DESCRIPTION

Stock exchange Module:

Detailed information about each share is deal by this module. As there are three famous
stock markets, this module has three sub modules: NSE, BSE and MSE.Each company has unique
code in each market. Share share bought in one market can’t be sold in another market.

The information displayed in each Stock exchange are company name, share type Best
buying price, no.of.shares, best selling price, day’s high, day’s low, opening price, previous
closing price. These data are dynamic in nature. It changes every minute.

Customer Information Module:

In this module, it maintains the information about the customer. It may be edit by the
customer. It maintain the information of the demate number, customer number, trading
account number, bank account number and his personal details.

Investment Information Module:

In this module, it maintains the information about the shares in hand. It maintains
the information of the company name, number of shares, purchase date, purchase rate.

14
Bank Transaction Module:

In this module, customer can transfer money from his bank account to trading
account. Demate account is updated t hold the correct no.of.shares. Share count will be
incremented in the demate account of buyer and decremented in seller account. It also
maintains the customer credit card number transaction.

Trading Management Module:

In this module, customer can transfer money from his trading account to bank
account. Trade management maintains balance of trading account, demate number and
account number.

Brokerage Module:

In this module, it maintains the company details and the no.of.shares issued by the
company. The unit price of each share is also determined. This module deal with the
commission issued to the broker by the company. It maintains the details about the
no.of.shares purchased and sold by the customer.

15
5.SYSTEM DESIGN

System design is the process of defining the architecture, components, interfaces


and data for a system to satisfy specified requirement. System design could be seen as the
application of system theory to product development. System configuration that meets an
identified or requirements set of requirements.

The activity of designing the system is carried out from an identified set of
requirements which satisfies these requirements. A distinction is sometimes drawn between
high level and architectural design, which is concerned with the main components of the
system and their role and interrelationship, and detailed design, which is concerned with
the internal structure and operation of individual components. The term system design is
sometimes used to cover just the high level design activity.

5.1 INPUT DESIGN

It is the first part of system design. The main aim of the input design is covering user-
oriented descriptions of the input to the computer-oriented form. All the inputs are converted
into a computer based format. The goal of designing input data is to make data entry ad easier,
and free from errors as possible.

The data is passed to the database through input screens. If any error occurs in the input
design, then the process and output are incorrect. During each entry of input data, guidelines
are provided to the user to avoid inaccurate entirely. An input format should be logical and easy
to understand. Each area in the form should be clearly identified and should specify to the user
what to write and where to write it. The designer should avoid error and it should help the
management to obtain the correct information from the computerized system.

Buy

After-login into the system is the wishes o buy the share, he should fill the Company
name, no of shares rate of shares.

16
Sell

After-login into the system is the wishes o buy the share, he should fill the Company
name, no of shares rate of shares.

5.2 OUTPUT DESIGN

The approach of output design is independent on the type of output and the nature
of the data but special attention has been given top editing. Once the output has been
chosen can be in the form of operational documents lengthily reports or summarizing
graphs. The Reports of share trading system are given below Customer Details report list out
customer details /Transaction Report list out the transaction information that has been fixed
to a particular data.

5.3 DATABASE DESIGN

Database design is the process of producing a detailed data model of database. This
data model contains all the needed logical and physical design choices and physical storage
parameters needed to generate a design in a data definition language, which can then be used
to create a database. A fully attributed data model contains detailed attributes for each entity.
The term database design can be used to describe many different parts of the design of an
overall database system. Principally, and most correctly, it can be thought of as the logical
design of the base data structure used to store the data. In the relational model these are the
tables and views. In an object database the entities and relationships classes
andnamedrelationships.However,thetermdatabasedesigncouldalsobeusedtoapply to the
overall process of designing, not just the base data structures, but also the forms and
queriesusedaspartoftheoveralldatabaseapplicationwithinthedatabasemanagementsystem
(DBMS).

The process of doing database design generally consists of a number of steps which
will be carried out by the database designer. Usually, the designer must:

 Determine the data to be stored in the database.


 Determine the relationships between the different data elements.
 Superimpose a logical structure upon the data on the basic of these relationships

17
5.4 DATA FLOW DIAGRAM
Data Flow Diagram (DFD) is a diagram that describe the flow of data and the
processesthatchangedatathroughoutasystem.It’sastructureanalysisanddesigntool that can
be used for flow charting in place of or in association with information. Oriented and
process oriented system flowcharts. Four basic symbols are used to construct data
transformation and data storage. The points at which data transformed are represented by
enclosed figures, usually circles, which are called nodes.

LEVEL 0 Details
Office
Login
Manageme
nt
User name, password Confirmation Update

Validation

login Office files


user

User Details Add Details

Registra Registration
tion

LEVEL 1

Enquires
visitor Online
View Details Database
Trading

LEVEL 2

Administrator
r 18
login details Login

login

verification & approvals

Trading files
Online Over
trade
system control

visitor Trade
manage
ment
user
managing

19
6.SYSTEM TESTING AND IMPLENTATION
System testing is actually a series of different tests whose sole purpose is to exercise
the full computer based system. System testing is testing conducted on a
complete,intergrated system to evaluate the system’s compliance with specified
requirements. System testing is a more limited types of testing . In system testing the
functionalities of the system are tested from an end-to-end perspective System testing is
usually carried out by a team that is independent of the development team in order to
measure the quality of the system unbiased. It includes both functional non-functional
testing.

6.1 TESTING AND METHODOLOGIES


System testing is the state of implementation, which is aimed at ensuring that the
system works accurately and efficiently as expert before live operation, commences. It
certifies that the whole set of programs hang together System testing requires a test plan
that consist of several key activities an steps for run program, string, system and user
acceptance testing.

The implementation of newly design package is important in adopting a successful


new system. Testing is important stage in software development. System testing
implementation should be a confirmation that all is correct and an opportunity to show the
users that the system works as they expected. It accounts the largest percentage of
technical effort in software development process.

In system testing a common view is to eliminate program errors. This is extremely


difficult and time consuming. Since designers cannot prove 100% accuracy. A successful test,
then, is one that find errors

ALPHA AND BETA TESTING

The alpha testing is conducted at the developer’s site by the customer. The software
is used in the natural setting with the developer”looking over the developer” and recording
errors and usages problems. Alpha test is conducted in controlled environment. The beta
testing is conducted at one or more customer site by the end user of the software. Unlike

20
software testing the developer is generally not present. Therefore beta test is live
application of the software in an environment that cannot be controlled by the developer

SECURITY TESTING

Any computer based system that manages sensitive information or causes action that
can improperly harm(or benefit) individuals is the target for improper or illegal penetration.
Penetration spans a board range of activities; hackers who penetrate system for sport;
disgruntled employee whoattempt to penetrate for revenge; dishonest individual who
penetrate for illicit personnel gains .Security testing to verify that protection mechanism built
into a system will in fact provide proper protection form improper penetration.

During system testing, the tester play the role of the individual who desires to
penetrate the system. Anything goes! The tester may attempt to acquire password through
external clerical means; may attack the system with custom software designed to break own
any defenses that have been constructed may overwhelm the system thereby denying .

6.2 VALIDATION

It checks the quality of the software in both simulated and live environments.In the
Simulated approach the developers test the product on their workplace to make the
products meet its requireements. In the Live Environment phase the product is given to the
customer to evaluate the product’s functionality.Validation refers to the different set of
activities that ensure that software correctly implements a specific function and the
software that been built is traceable to customer requirements.

Verification and validation can be defined in a way like:Verification.


ValidationSoftware validation is achieved through a series of black-box test that
demonstrate conformity with requirement. After each validation check a test has been
conducted, one of the two possible condition exists

 The function or performance characteristics conform to specification and are expected

 A deviation from specification is uncovered and a deficiency list is created

21
VALIDATION CHECK APPLIED IN THE PROJECT

 The files entered in the project must only have the doc extension

 The data entered must have only one format

 One should not make a enter into without checking the password

 The qc must enter into the status column only accepted or not accepted

 File which are already be registered should not be registered once again or other time

 Qc can’t enter the file which are not entered by the dc

 Qc should enter the file into corresponding filenames registered by the dc

 Files which are registered and not accepted for the first time should not be registered
again but the reentry of date and status should be done only

THREAD
Threat is the probability (which can be derived or estimated from empirical evidence)
that an attack of specific type occur with in a specific time.
SECURITY
Security is the probability (which can be estimated or derived from empirical
evidence) that attack on the specific type will be repelled.
SECURITY TESTING
Any computer based system that manages sensitive information or causes action that
can improperly harm(or benefit) individuals is the target for improper or illegal penetration.
Penetration spans a board range of activities; hackers who penetrate system for sport;
disgruntled employee who attempt to penetrate for revenge; dishonest individual who
penetrate for illicit personnel gains Security testing to verify that protection mechanism built
into a system will in fact provide proper protection form improper penetration. During system
testing, the tester plays the role of the individual who desires to penetrate the system.
Anything goes! The tester may attempt to acquire password through external clerical means;
may attack the system with custom software designed to break down any defenses that have
been constructed may overwhelm the system thereby denying the service to other; may
purposely cause system errors.

22
6.3 IMPLEMENTATION
Implementation is used here to mean the process of converting a new or revised
system design into operational one; conversion is one aspect of implementation. the other
aspect is post implementation review and software and maintenance
There are three type of implementation:
 Implementation of a computer system
 Implementation of new computer system
 Implementation of a modified application

IMPLEMENTATION OF THE COMPUTER SYSTEM


It’s should be replace a manual system the problems encountered are converting files,
training users creating accurate files, and verifying printouts for integrity.

IMPLEMENTATION OF A MODIFIED APPLICATION


It’s should be replace an existing one using the same computer. This type of
conversion is relativity easy to handle, provided there are no major changes to the file

MAINTENANCE
After the system has successfully implemented maintenance activity may require
continuous involvement of the developers. Provision must be made for environmental
changes, which may affect either the computer, or other parts of computer based system: such
activity is normally called maintenance. It includes both the improvement of system functions
and the correction of faults that arise during the operation of a system.
Maintenance activity may require the continuing involvement of a large proportion of
computer department resources. Maintenance works may arise due to two reasons.
 Error that creep up during normal running.
 Request for changes by the service providers. As part of the normal running of the
system when errors are found.

23
This maintenance work will help to ensure that the system works smoothly as predicted in the
open environment. Whenever a maintenance work arises, the work has to be properly carried
out with proper documentation. This is to avoid any form of changes in the structure of the
system.For every maintenance work an amendment notification is to be issued. This
notification will have the required changes and also authenticated. On receipt of the
amendment notification the amendment log is prepared which records these courses of action
that has been planned to be taken. It also records the estimated and the actual completion
of each of the activities

24
7.CONCLUSION
“Online Share Trading System” deals with the buying and selling of shares through online.
This project highly reduces the work done manually. Each and every activity done manually
in the share process had been computerized. The redundancy involved in the manual process
had been completely irradiated in this project.
This provides an effective Application Integration for huge volume business houses. The
system helps the administrator to monitor the services response from the customer and send
to the web site company. This would enhance the business value of internet service provider
and thus is helpful for the growth of the organization.

FUTURE ENHANCEMENT

SCOPE OF FUTURE ENHANCEMENT

The Online Share Trading System has been designed in a manner to any further enhancement or
further modification in future. The user can be provided with more interactive screens, this
project is mainly focused upon the transaction of the shares of Software Company in future it can
be modified for all other companies. This companies can be added in future who are going to
convert their shares into demate format.

25
8.BIBLOGRAPHY

BOOKS REFERED:

 Luke Willing, Luras Thomson, PHP and MySQL WebDevelopment,1st Edition, Maech
2001.

 Matt Zandstra, TeachUrself PHP in 24Hours,1st Edition, June 2000.

WEBSITES REFERRED

1. For Jquery:http://jquery.com

2. For css:http://www.w3schools.com/css/default.asp

3. For PHP:http://www.w3schools.com/css/default.asp

26
APPENDIX
TABLE DESIGN
Table Name : Admin
FIELD NAME DATA TYPE SIZE DESCRIPTION
U_NAME Varchar 100 Username
Pwd Varchar 100 Password

Table Name : Register


Primary Key : U_Name
Unique key : SNo

FIELD NAME DATA TYPE SIZE DESCRIPTION


SNo Int 5 S No

U_Name Varchar 50 User Name


U_Email Varchar 25 User Email ID
PWD Varchar 10 Password

Status Varchar 20 Status

27
Table Name : Client
Primary Key : Cid Cname
Unique Key : SNo

FIELD NAME DATA TYPE SIZE DESCRIPTION


SNo Int 15 S No
Cid Int 15 Client Id
Cname Varchar 20 Client Name
Crate Decimal (7.2) Decimal
Status Varchar 20 Status
Prate Decimal (7.2) Prate
Share Int 20 Share

Table Name :Regsister


Primary key : U_Name
Unique key : SNo

Field Name Data Type Size Description

SNo Int 5 S No

U_Name Varchar 15 User Name

U_Email Varchar 25 User Email

Pwd Varchar 10 Passsword

Status Varchar 20 Status

28
SCREEN SHOTS

HOME PAGE:

LOG IN:

29
ADMIN LOGIN:

30
31
32
33
34
SAMPLE CODING :
<?php

$cid=$_POST['cid'];

$cname=$_POST['cname'];

$crate=$_POST['crate'];

$status=$_POST['status'];

$prate=$_POST['prate'];

$share=$_POST['share'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

    $ins=mysqli_query($con,"insert into

client_table(cid,cname,crate,status,prate,share)

values('$cid','$cname','$crate','$status','$prate','$share')");

    if($ins){

   

        header('Location:client.php?msg=Inserted');

   

    }else{

        echo "Not Inserted".mysqli_error($con);

    }

}else{

    echo "Not Connected".mysqli_error($con);

?>

35
<?php

$cid=$_POST['cid'];

$cname=$_POST['cname'];

$crate=$_POST['crate'];

$share=$_POST['share'];

$reqshare=$_POST['reqshare'];

$totamount=$_POST['totamount'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

  $rs=$share-$reqshare;

echo $rs;

      if($rs>=0){

       $res= mysqli_query($con,"select * from buy_table where

cname='$cname'");

       $row=mysqli_fetch_row($res);

       echo $row[6];

       if($row=mysqli_fetch_row($res)>0){

         $shr=$row[4];

         $shr1=$shr+$share;

         echo "hi";

        $upd1=mysqli_query($con,"update buy_table set

reqshare='$shr1' where cname='$cname'");

        if($upd1){

36
          header("location:view_admin.php");

        }else{

          echo "Not Updated".mysqli_error($con);

        }

       }else{

       $ins=mysqli_query($con,"insert into

buy_table(cid,cname,crate,share,reqshare,totamount)

values('$cid','$cname','$crate','$share','$reqshare','$totamount')")

    if($ins){

       $upd=mysqli_query($con,"update client_table set share='$rs'

where cname='$cname'");

        if($upd){

          header("location:view_admin.php");

        }else{

          echo "Not Updated".mysqli_error($con);

        }

    }

  }

    }else{

        echo "Not available share".mysqli_error($con);

    }

}else{

    echo "Not Connected".mysqli_error($con);

37
?>

<?php

$cname=$_GET['cname'];

           

$con=mysqli_connect("localhost","root","","share_trading");

           

                $res=mysqli_query($con,"select * from buy_table

where cname='$cname'");

               $row=mysqli_fetch_row($res);

            ?>

        <br><form action="" method="POST" class="form">

            <div class="add">

            <b><h1>PAYMENT</h1></b>

             <h4 class="h4">BROKER ID:</h4>

             <input type="number" name="cid" value="<?php echo

$row[1]; ?>" readonly><br>

             <h4 class="h4">COMPANY NAME:</h4>

            <input type="text" name="cname" value="<?php echo

$row[2]; ?>" readonly><br>

            <h4 class="h4">CURRENT RATE:</h4>

            <input type="number" name="crate"  id="crate" value="<?

php echo $row[3]; ?>" readonly><br>

            <h4 class="h4">NUMBER OF SHARES:</h4>

            <input type="number" name="reqshare" value="<?php echo

$row[4]; ?>" readonly>

38
            <h4 class="h4">REQUIRED SHARES:</h4>

            <input type="number" name="share" id="rshare"

placeholder="required_shares" required="">

            <h4 class="h4">TOTAL AMOUNT:</h4>

            <input type="number" name="totamount" id="totamt"

placeholder="total_amount" required="" onfocus="cal(this)">

            <button>BUY</button>

            </div>

        </form>

        <?php

        ?>

<?php

$cname =$_GET['cname'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

    $ans=mysqli_query($con,"delete from buy_table where

cname='$cname'");

   if($ans){

    header('Location:viewshare.php');

   

   }

?>

<?php

39
$cname =$_GET['cname'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

    $ans=mysqli_query($con,"delete from client_table where

cname='$cname'");

   if($ans){

    header('Location:viewclient.php');

   

   }

?>

<?php

$cname=$_GET['cname'];

      $con=mysqli_connect("localhost","root","","share_trading");

     

          $res=mysqli_query($con,"select * from buy_table where

cname='$cname'");

         $row=mysqli_fetch_row($res);

   

      <?php

@$cname=$_GET['cname'];

      $con=mysqli_connect("localhost","root","","share_trading");

     

          $res=mysqli_query($con,"select * from client_table where

cname='$cname'");

40
         $row=mysqli_fetch_row($res);

      ?>

        <br><form action="update.php" method="POST" class="form">

            <div class="add">

            <b><h1>EDIT SHARES</h1></b>

            <input type="number" name="cid" value="<?php echo

$row[1]; ?>"><br>

            <input type="text" name="cname" value="<?php echo

$row[2]; ?>" readonly><br>

            <input type="number" name="crate" value="<?php echo

$row[3]; ?>"><br>

            <input type="text" name="status" value="<?php echo

$row[4]; ?>"><br>

                <input type="number" name="prate" value="<?php echo

$row[5]; ?>"><br>

                <input type="number" name="share" value="<?php echo

$row[6]; ?>"><br>

                <button>EDIT</button>

            </div>

        </form>

        <?php

         //}

         ?>

</header>

<div class="centered">

41
  <b><h1>Invest in stocks</h1>

  <p>Trusted by Millions of Indians. start investing today</p>

 <br> <a href="login.html" class="button">Get Started</a>

</div>

</form>

</body>

</html>

<?php

$uname=$_POST['uname'];

$pwd=$_POST['pwd'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

    $ans=mysqli_query($con,"select status from register where

uname='$uname' and pwd='$pwd'");

    $res=mysqli_fetch_row($ans);

    if($res>0){

        echo "Valid User".$res[0];

        if($res[0]=="broker"){

                  header('Location:admin.html');

        }else if($res[0]=="customer"){

            header('Location:customer.html');

        }else if($res[0]=="admin"){

            header('Location:client.php');

           

42
        }else {

            header("location:login.html");

        }

    }else{

        echo "Not Valid User".mysqli_error($con);

    }

}else{

    echo "Not Connected".mysqli_error($con);

?>

<?php

session_start();

unset($_SESSION["id"]);

unset($_SESSION["uname"]);

header("Location:login.html");

?>

<script>

    function printDiv(receipt){

        var

printContents=document.getElementById(receipt).innerHTML;

        w=window.open();

        w.document.write(printContents);

        w.print();

        w.close();

43
    }

    </script>

<?php

$sno=$_GET['sno'];

      $con=mysqli_connect("localhost","root","","share_trading");

      if($con){

          $res=mysqli_query($con,"select *from buy_table where

sno='$sno'");

          $row=mysqli_fetch_row($res);

      ?>

<br><form class="form">

<div name="receipt" id="print-content">

    <h1>PAYMENT RECEIPT</h1>

    <table class="">

        <th>

           

            <tr>CID:<?php echo $row[1]; ?></tr><br>

            <tr>CNAME:<?php echo $row[2]; ?></tr><br>

            <tr>CURRENT RATE:<?php echo $row[3]; ?></tr><br>

            <tr>SHARES:<?php echo $row[4]; ?></tr><br>

            <tr>TOTAL AMOUNT:<?php echo $row[5]; ?><tr><br>

        </th>

       

      <?php

44
      }

    ?>

      </table>

    </div>

    <button onclick="printDiv('print-content')" value="print a

div">PRINT</button>

</form>

<?php

$uname=$_POST['uname'];

$uemail=$_POST['uemail'];

$pwd=$_POST['pwd'];

$status=$_POST['status'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

    $ins=mysqli_query($con,"insert into

Register(uname,uemail,pwd,status)

values('$uname','$uemail','$pwd','$status')");

    if($ins){

        header("location:login.html");

    }else{

        echo "Not Inserted".mysqli_error($con);

    }

}else{

    echo "Not Connected".mysqli_error($con);

45
?>

<?php

$cname =$_GET['cname'];

$con=mysqli_connect("localhost","root","","share_trading");

$res=mysqli_query($con,"select status from client_table where

cname='$cname'");

$row=mysqli_fetch_row($res);

$status=$row[0];

if($status=="open"){

    $ans=mysqli_query($con,"update client_table set status='close'

where cname='$cname'");

   if($ans){

    header('Location:viewclient.php');

   }else{

    echo "Not Valid status".mysqli_error($con);

   }

}else{

    $ans=mysqli_query($con,"update client_table set status='open'

where cname='$cname'");

   if($ans){

    header('Location:viewclient.php');

   }else{

    echo "Not Valid status".mysqli_error($con);

   }

46
?>

      <?php

      $con=mysqli_connect("localhost","root","","share_trading");

      if($con){

          $res=mysqli_query($con,"select * from buy_table");

          while($row=mysqli_fetch_row($res)){

      ?>

      <tr><td><?php echo $row[1]; ?></td><td><?php echo $row[2]; ?

></td>

      <td><?php echo $row[3]; ?></td><td><?php echo $row[4];

?></td><td><a href="customer_payment.php?cname=<?php echo $row[2]; ?

>" class="button">BUY</a></td></td></tr></tr>

      <?php

      }

    }

      ?>

      </table>

    </div>

</form>

</body>

</html>

<?php

$cid=$_POST['cid'];

$cname=$_POST['cname'];

47
$crate=$_POST['crate'];

$reqshare=$_POST['reqshare'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

    $ins=mysqli_query($con,"update buy_table set

cid='$cid',crate='$crate',reqshare='$reqshare' where

cname='$cname'");

    if($ins){

   

        header('Location:view_admin.php');

   

    }else{

        echo "Not Updated".mysqli_error($con);

    }

}else{

    echo "Not Connected".mysqli_error($con);

?>

<?php

$cid=$_POST['cid'];

$cname=$_POST['cname'];

$crate=$_POST['crate'];

48
$status=$_POST['status'];

$prate=$_POST['prate'];

$share=$_POST['share'];

$con=mysqli_connect("localhost","root","","share_trading");

if($con){

    $ins=mysqli_query($con,"update client_table set

cid='$cid',crate='$crate',status='$status',prate='$prate',share='$sh

are' where cname='$cname'");

    if($ins){

   

        header('Location:viewclient.php');

   

    }else{

        echo "Not Updated".mysqli_error($con);

    }

}else{

    echo "Not Connected".mysqli_error($con);

?>

      <?php

      $con=mysqli_connect("localhost","root","","share_trading");

      if($con){

          $res=mysqli_query($con,"select * from buy_table");

49
          while($row=mysqli_fetch_row($res)){

      ?>

      <tr><td><?php echo $row[0]; ?></td><td><?php echo $row[1]; ?

></td><td><?php echo $row[2]; ?></td>

      <td><?php echo $row[3]; ?></td><td><?php echo $row[4];

?></td><td><?php echo $row[5]; ?></td><td><a href="edit_admin.php?

cname=<?php echo $row[2]; ?>" class="button">Edit</a></td>

      <td><a href="delete_admin.php?cname=<?php echo $row[2]; ?>"

class="button">Delete</a></td><td><a href="receipt.php?sno=<?php

echo $row[0]; ?>" class="button">RECEIPT</a></td></tr></tr>

      <?php

      }

    }

      ?>

      </table>

    </div>

</form>

</body>

</html>

<table style="width:100%" id="table">

        <tr><th>CID</th><th>CNAME</th><th>CURRENT

RATE</th><th>STATUS</th><th>PREVIOUS

RATE</th><th>SHARES</th><th>BUY</th></tr>

      <?php

      $con=mysqli_connect("localhost","root","","share_trading");

50
      if($con){

          $res=mysqli_query($con,"select * from client_table");

          while($row=mysqli_fetch_row($res)){

      ?>

      <tr><td><?php echo $row[1]; ?></td><td><?php echo $row[2]; ?

></td><td><?php echo $row[3]; ?></td>

      <td><?php echo $row[4]; ?></td><td><?php echo

$row[5];?></td><td><?php echo $row[6]; ?></td><td><a

href="broker_payment.php?cname=<?php echo $row[2]; ?>"

class="button">BUY</a></td></tr>

      <?php

      }

    }

      ?>

      </table>

51

You might also like