Upload
suchita-chaudhary
View
35
Download
2
Tags:
Embed Size (px)
DESCRIPTION
This is the report pf the internship on online dispensary management system
Citation preview
A SUMMER INTERNSHIP REPORT
PROJECT ON ONLINE DISPENSARY
MANAGEMENT SYSTEMSubmitted by:
Suchita Chaudhary
12CS001590Performed At
Genx Soft Technologies, JAIPUR
In partial fulfilment for the award of the degree
of
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
SIR PADAMPAT SINGHANIA UNIVERSITY UDAIPUR
DECLARATION
I Suchita Chaudhary student of Sir Padampat Singhania University, Udaipur, hereby declare
that the project titled “Online Dispensary Management System” is my original as all of the
information facts and figure in this report is based on my own training experience and study
during my summer training procedure.
Signature : _________________________
Name : _________________________
Enroll. No. : _________________________
Date : _________________________
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page I
CERTIFICATE
This is to certify Miss. Suchita Chaudhary a student of B.tech 2012 Batch has undergone
summer training in GENX SOFT TECHNOLOGIES at JAIPUR on the topic of “ONLINE
DISPENSARY MANAGEMENT SYSTEM” for a period of 45 days commencing from date
18th May to 4th July.
This summer training project report embodies the facts and figures collected and interpreted by
her during the course of training.
Dr. PRASUN CHAKRABARTI
(HOD, CSE)
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page II
ACKNOWLEDGMENT
I take the opportunity to express my gratitude to all the concerned people who have directly or
indirectly contributed towards completion of this project. I extend my sincere gratitude towards
GENX SOFT for providing the opportunity and resources to work on this project.
I express my gratitude to Head of the Department Mr. Prasun Chakrabarti for his constant
support and belief.
At this juncture I feel deeply honored in expressing my sincere thanks to Miss Pooja Singh. for
making the resources available at right time and providing valuable insights leading to the
successful completion of my project. I would also like to thank all the staff members and my
colleagues for their critical advice and guidance without which this project would not have been
possible.
Suchita Chaudhary
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page III
ABSTRACT
We have developed a project on “Online Dispensary Management System” on a PHP
platform. This project is about an online medical site which is open for all. The interface is very
user-friendly. The data are well protected for personal use and makes the data processing very
fast.The project is based on the database, object oriented and networking techniques. As there are
many areas where we keep the records in database for which we are using MY SQL software
which is one of the best and the easiest software to keep our information. This project uses PHP
as the front-end software and has connectivity with MY SQL.Our Project includes registrations
of members, storing their detail. Registered members then check the details of the doctors which
are on duty, their schedule, medicines available on medical store. There is a contact page
available which includes the detail of all the departments. Admin can update the details like
contact no or E-mail_id accordingly. Clients can also request for the change of password which
will be updated in the database. Only admin can make any changes to the portal other than
personal details of the clients. The details of all the clients are stored in the database. Other than
this there is also an enquiry form and subscribe form provided for clients. We have worked on
the languages such as HTML (Hypertext Markup Language), CSS (Cascading Style Sheets),
Javascript, Jquery. For Database we have worked on MySql platform. We have used the software
like Dreamweaver CC, Wamp.
Head of Department (HOD), Bareilly whose insight encouraged me to go beyond the scope of
the project and this broadened me learning on this project.
I also want to show my gratitude to Mrs. Pooja Singh, HR manager of training and development
section whose insight helped me to complete this project.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page IV
TABLE OF CONTENTS
Declaration I
Certification II
Acknowledgement III
Abstract IV
CHAPTER 1: INTRODUCTION 1-8
1.1History of Genx
Error: Reference source not found
1.2 Company’s Growth Value
Error: Reference source not found-3
1.2.1 Company’s Competitive Key Issues
Error: Reference source not found
1.2.2 Process and Initiatives
Error: Reference source not found
1.2.3 Work Quality Management
Error: Reference source not found
1.2.4 Rewards and Achievements 3
1.3 Co-operate Training and Entertainment 3
1.4 Health and Meditation 3
1.5 Worldwide Genx 3-4
1.5.1 Geographical Location 4
1.6 Special Features 4
1.7 Company Profile 5-6
1.7.1 About the Company 5
1.7.2 About Development Wing 5
1.7.3 Co-operate Social Reponsibilities 5
1.7.4 Company’s Expert Panel 6
1.7.5 Company’s Strategic Approch 6
1.8 Services 6-8
1.8.1 Software Development 6
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page V
1.8.2 Complete Analysis and Research Work for Business 6
1.8.3 Technical Assistance Services 7
1.8.4 Web Application Development 8
1.8.5 Web Designing and Script Writing 8
1.8.6 Web Application Develpoment 8
CHAPTER 2: HTML 9-15
2.1 Introduction Of HTML 9-10
2.2 Markup 10-12
2.3 Elements 13-15
2.3.1 Head Element 13
2.3.2 Paragraph 14
2.3.3 Break 14
2.3.4 Comments 15
CHAPTER 3: JAVASCRIPT 16-20
3.1 Introduction of Javascript 16-18
3.2.1 Javascript Change HTML Contents 16
3.2.2 Javascript Change HTML style(CSS) 16
3.2.3 Syntax 16-18
3.3 Use in Web Pages 18-19
3.4 Compatibility Considerations 19-20
CHAPTER 4: CSS 21-24
4.1 Introduction to CSS 21
4.2 Syntax 21-22
4.3 Selector 22
4.4 Usage 22-24
CHAPTER 5:JQUERY and BOOTSTRAP 25-30
5.1 Inrtroduction to JQuery 25
5.2 Features 25-26
5.3 Browser Support 26
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page VI
5.4 Usage 26-27
5.4.1 Usage Style 27
5.5 Introduction to Bootstrap 28
5.6 Structure and Function 28-30
5.6.1 Bootstrap-CSS 30
5.6.2 Bootstrap-Re-Usable Components 30
5.6.3 Bootstrap-Javascript 30
CHAPTER 6:PHP and MYSQL 31-45
6.1 Inrtroduction to MySQL 31
6.1.1 History 32
6.1.2 Milestone 32-33
6.1.3 MySQL Functions 32-35
6.1.4 MySQL Commands 35-39
6.2 Introduction Of PHP 39-40
6.2.1Syntax 40-41
6.2.2 PHP Functions 41-45
CHAPTER 7:PANELS 46
5.1 Inrtroduction to Panel 46
CHAPTER 8:PROJECT DESCRIPTION 47-62
8.1 Inrtroduction 47
8.2 Details about the Project 48-55
5.2.1 Information Page 49-52
5.2.2 Contact Page 53
5.2.3 Login Page 54-55
5.2.4 Footer 55
8. 3 MySQL 55
8.3.1 Admin Panel 55-58
8.3.2 User Panel 58-60
8. 4 Software Used 60-62
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page VII
8.4.1 Adobe Dreamweaver 60-61
8.4.2 Wamp 61-62
CONCLUSIONS 63
REFERENCES 64
LISTS OF FIGURES
S.no. Name of figure or chapter Page no.
1 Geographical location 4
2 Webpage Using Bootstrap 25
3 PHP 39
4 Panel 42
5 Project Description 45
6 Information Page 46
7 Medical Store 47
8 Contact Page 49
9 Login Page 51
10 Footer 52
11 MySql 53
12 Admin Panel 54
13 User Panel 55
14 Software Used 56
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page VIII
LIST OF ABBREVATIONS
HTML HyperText Markup Language
CSS Cascading Style Sheets
PHP HyperText Preprocessor
SQL Structure Query Language
WAMP Windows, Apache,MySQl,PHP
XML Extensible Markup Language
XHTML Extensible HyperText Markup Language
AJAX Asynachronous JavaScript and XML
DOM Document Object Model
JSON Javascript object and notation
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page IX
CHAPTER 1
INTRODUCTION
1.1 History of Genx
GENX SOFT TECHNOLOGIES PVT LTD Was Established in 2010 At Jaipur, Specialised in
Web Application Development, Website Designing, Software Application Development and
Mobile Application Development. Company has established its Core Development Units at
Bangalore, Delhi, Jaipur, Bhopal, and Gwalior with excellent infrastructure.
The company has its own brand identity in international market. We have a quality stack holders
dedicated towards adding continuous values to our client based services & process. We also
deals in Professional Web Hosting, S.E.O. Services, Process Consultation and other IT related
services at Jaipur and other branches.
1.2 Company's Growth Values
GENX SOFTWARES is one of the leading brands in global IT market. GENX SOFTWARES
has served more than 1000 clients worldwide. GENX SOFWTARES is a privately held company
reserves rights to offer services worldwide. The most important key issue of our continuous
growth is our Valuable & Skilled Employees.
1.2.1 Company’s Competitive Key Issues:-
- Young, Energetic & Experienced Team.
- Perfect Hierarchal Management.
- Our Pricing & Quality make us different from others.
- Our High Tech Infrastructure.
- Our Global Partnership.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 1
1.2.2 Process And Initiatives
GENX SOFT TECHNOLOGIES follows proactive approach in its Development &
Designing Process to reduce communication GAP between
Developments.
We always have a Ready to Work Team which has got excellent interpersonal & technical skills
to gear up the process of SDLC in the best manner. At the very first step of SDLC we clearly
understand the expectation & requirements with complete documentation & Fact Sheets.
We have a very strong network for Client Support Service; they are responsible to intimate all
updates & status to the client as per the report by the Technical Or Development Teamto Our
Project Processing & Management Team smartly prepares complete documentation for the Work
& Process Flow with Given Deadlines by the client. Because we trust on a well-planned process
& documentation for smooth, quality .We Offer a dedicated Server ID by Which a client can
check his project status update online and request/suggest for a change. Because we are a team
who believe in working on deadline with ultimate project quality.
1.2.3 Work Quality Management
Our Project Management team is highly motivated towards offer excellent work quality to our
clients. We believe good quality work always influence our clients to share good experience with
others. Our Development & Project Management team is highly qualified and motivate for work
delivery. We follow our own researched quality benchmarking model to complete & deliver the
project work as per deadlines.
We use some important methodology to work:- Eagerness to work creative & hard for client’s positive feedback.
Feeling of ownership that each member can be a one man army with skills & Expertise.
Motivation of Rewards & Achievements for every individual & Team.
Unique Direction & Perfect personal & HR management.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 2
1.2.4 Rewards & Achievement Excellent Learning & Motivation for the quality is the utmost important culture of GENX
SOFT TECHNOLOGIES (P) LTD. Our employees enjoy a rewarding career oriented working
culture which influence them to achieve expected growth in given period of time.
We have passionate young engineers & manager educated from TOP universities of India as well
abroad. While working with GENX SOFT they feel pleasure and happy to work.
1.3 Corporate Training & Entertainment
We believe that a skilled employee needs high end corporate training to understand the working
culture of a company. We have Global Tie-ups for Employee Training & Orientation Program.
We work on their skills & professionalism development so that they can become a long.
We have a trend to celebrate all moments which can refresh the mind of our employees so can
they can get back to their work with more energy. We organize all related company ceremonies
in with employees take a part to celebrate each moment.
1.4 Health & Meditation
We have arranged complete Corporate Health Checkup Facility by our Employee Health Care
card and check up service is available in all Metro Cities.
1.5 Worldwide Genx
As Global IT scenario is changing frequently and taking important place in worldwide
advancement. It has become an important consideration to serve in the best way. For the same
we have Different Business Units across India to serve our clients in the better way.
We have established our well-equipped Development Units in Major States of India with quality
circle & expert team. We have Our Major Clients from overseas like US. ,UK, Australia etc. We
have expert Client Support department with skilled employees who really care for client’s core
values.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 3
1.5.1 GEOGRAPHICAL LOCATION
1.6 Special Facilities for Outsourcing & Working Process
We Provide Day-Night Both Shifts to work on overseas projects.
We have well equipped Development Wings having quality skills for technical working.
Trained Client Support Executives with Excellent communication & Accent to
understand your development need & changes.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 4
1.7 Company Profile
1.7.1 About the Company
GENX SOFT TECHNOLOGIES PVT. LTD. Is a Company based on INDIA, which is
incorporated under the companies Act 1956. GENX SOFT is a sister concerned company of
ROYALS GROUP which is dealing in IT Service industry Since 2005.
GENX SOFT TECHNOLOGIES PVT. LTD. Is a company developing IT products and
outsourcing it to the world wide clients as well National clients. It offers services to B2B as well
B2C with the ultimate and unmatched experience. GENX Group has initiated foot prints in so
many sectors like Manufacturing, IT services, Retailing, Education, Consultancy, Real Estate
etc.
The company has its prime motive to deliver the quality IT services & Products to the end
customer. Company has recently developed its own S&D (Software & Development) Division.
The major Business of the company is Software Development & Web Application Development.
GENX is planning to launch so many service portals toincrease the business of itsexisting clients.
1.7.2 About Development Wing:-
GENX SOFT Company has developed its primary research & Development Division in Jaipur,
Rajasthan popularly known as PINK CITY. Operational Divisions of GENX SOFT:-
Software & Development Division.
Training & Development Division.
Technical Support Division.
Company has its prime motive to serve the IT sector as a renowned IT catalyst.
1.7.3 Corporate Social Responsibilities:-
CSR is a very important duty and responsibility of any organization. We serve the society with
our concerned companies- Royals Group (R.C.W.E.). We have started Free Education & training
to the poor students of rural background in UP,MP,BIHAR.
Company has been associated in so many PSU projects so it becomes very important for us to
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 5
take care of our societal development. So many NGOs activities have been executed for the
same.
1.7.4 Company Expert Panel:-
Company believes to carry a quality circle for the expert knowledge & Skills. We have member
associated from different NITs, IITs and IIMs. .
Recently company has developed a latest well equipped research lab with latest technologies to
give the research support to its clients.
1.7.5 Company’s Strategic Approach:-
The company always adopts NICHE strategy of business so we have also captured untouched
market of different segments. It is a universal truth that business should always grow, that is why
GENX has started so many business setups but the problem occurred always is MAN POWER.
For developing the societal awareness and spreading the technical knowledge GENX has started
GENX HR SOLUTIONS which is bridging the gap b/w the candidate and company.
Company has got an expert panel of IT technocrats to develop and suggest the business
strategies.
1.8 Services
1.8.1 Software Development
At GENX, Software Development is a hard core issue to design and develop the services and
products.
Company offers all the services for Software Development & Solution to its worldwide clients.
Quality Circle of expert & experience developers we always give the best treatment to our
clients. For better improvement in our services company has developed so many portals to
facilitates its clients.
We always care for our commitments especially when it is about our professionalism.
Online 24*7 hours Service Support.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 6
Project & Software Documentation for meeting deadlines & commitments.
Expert Council & live technical assistance.
Unique client ID & Remote Project Assistance.
Status Alert of project & Online development.
1.8.2 Complete Analysis & Research work for business
We are a team of dedicated developers. Genx reshape your business plan to get the unique identity. We work for your business promotion to achieve your business targets.
Converting Ideas in Innovations Better Future with Status Converting present challenges in Future Opportunities
We are catering the IT industry last from so many decades but the prime motto with the updates what GENX has developed is to offer far better than the expected quality. We have different categories of products in which we have monopoly of technology in national as well international market. We have some special categories of software development
Web Applications/ Website College Management Software CRM Software Medical Software/ HR Portals Social Web Pages Development Anti-Virus Development
1.8.3 Technical Assistance Services
We have categorized our client support services and turn key projects
Turn Key Project Management On line technical support Log In access for live support Technical Transformation services
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 7
1.8.4 Web Application Development
GENX web development team has got a wide range of development tactics to design & Development a complete web application. We cater both static & dynamic web pages at very economic price with value added services.
1.8.5 Web Designing & Script Writing
Designing of the web application is the most important consideration and very sensitive for both client as well service provider. We have a separate web designing experts using different latest technologies.
Script (Content) writing is what called information to the client.
We write your thoughts & information which can put the best impact on client. We give a proper analysis for reducing gap b/w you and your client.
1.8.6 Web Application Development
We develop the complete web application/ web solution to promote your product on-line. The
complete application gets develop in the consideration of our web experts.
We use all major technologies PHP/.NET/JAVA for the web development. We design & develop
a complete Web portal to assist your online administration of your E-Store. It will be bind with
ample dynamic pages concepts to offer the best interaction to the client as well the solution what
your really wish to offer them.
Static web pages designing
E-commerce websites
Flash website designing
Dynamic website designing
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 8
CHAPTER 2HTML
2.1 Introduction
Hypertext Markup Language, commonly referred to as HTML, is the standard markup
language used to create web pages. It is written in the form of HTML elements consisting
of tags enclosed in angular brackets like (<html>). HTML tags most commonly come in pairs
like <h1> and </h1>, although some represent empty elements and so are unpaired, for ex.
<img>. The first tag in such a pair is the start tag, and the second is the end tag (they are also
called opening tags and closing tags).
Web browsers can read HTML files and render them into visible or audible web pages. Browsers
do not display the HTML tags and scripts, but use them to interpret the content of the page.
HTML describes the structure of a website semantically along with cues for presentation, making
it a markup language, rather than a programming language.
HTML elements form the building blocks of all websites. HTML allows images and objects to
be embedded and can be used to create interactive forms. It provides a means to create structured
documents by denoting structural semantics for text such as headings, paragraphs, lists, links,
quotes and other items. It can embed scripts written in languages such as JavaScript which affect
the behavior of HTML web pages.
Web browsers can also refer to Cascading Style Sheets (CSS) to define the look and layout of
text and other material. The World Wide Web Consortium (W3C), maintainer of both the HTML
and the CSS standards, has encouraged the use of CSS over explicit presentational HTML since
1997.
The first publicly available description of HTML was a document called "HTML Tags", first
mentioned on the Internet by Berners-Lee in late 1991. It describes 18 elements comprising the
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 9
initial, relatively simple design of HTML. Except for the hyperlink tag, these were strongly
influenced by SGML guide, an in-house Standard Generalized Markup Language (SGML)-based
documentation format at CERN. Eleven of these elements still exist in HTML4.
HTML is a markup language that web browsers use to interpret and compose text, images and
other material into visual or audible web pages. Default characteristics for every item of HTML
markup are defined in the browser, and these characteristics can be altered or enhanced by the
web page designer's additional use of CSS. Many of the text elements are found in the 1988 ISO
technical report TR 9537 Techniques for using SGML, which in turn covers the features of early
text formatting languages such as that used by the RUNOFF command developed in the early
1960s for the CTSS (Compatible Time-Sharing System) operating system: these formatting
commands were derived from the commands used by typesetters to manually format documents.
However, the SGML concept of generalized markup is based on elements (nested annotated
ranges with attributes) rather than merely print effects, with also the separation of structure and
markup; HTML has been progressively moved in this direction with CSS.
After the HTML and HTML+ drafts expired in early 1994, the IETF created an HTML Working
Group, which in 1995 completed "HTML 2.0", the first HTML specification intended to be
treated as a standard against which future implementations should be based.
Further development under the auspices of the IETF was stalled by competing interests. Since
1996, the HTML specifications have been maintained, with input from commercial software
vendors, by the World Wide Web Consortium (W3C).[13] However, in 2000, HTML also became
an international standard (ISO/IEC 15445:2000). HTML 4.01 was published in late 1999, with
further errata published through 2001. In 2004 development began on HTML5 in the Web
Hypertext Application Technology Working Group (WHATWG), which became a joint
deliverable with the W3C in 2008, and completed and standardized on 28 October 2014.
2.2 Markup
HTML markup consists of several key components, including those called tags (and
their attributes), character-based data types, character references and entity references. Another
important component of the HTML document type declaration, which triggers standards
mode rendering.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 10
Example : The following is an example of the classic Hello world program, a common test
employed for comparing programming languages, scripting languages and markup languages.
This example is made using 9 lines of code:
<!DOCTYPE html><html><head><title>This is a title</title></head><body><p>Hello world!</p></body></html>
Fig: 2.1 Example, to print hello world .
(The text between <html> and </html> describes the web page, and the text between <body> and
</body> is the visible page content. The markup text "<title>”. This is a title </title>" defines the
browser page title.)
The Document Type Declaration <DOCTYPE HTML> is for HTML5. If a declaration is not
included, various browsers will revert to "quirks mode" for rendering.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 11
Fig:2.2 Example of using <DOCTYPE HTML> in code.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 12
2.3 Elements
HTML documents imply a structure of nested HTML elements. These are indicated in the
document by HTML tags, enclosed in angle brackets thus: <p>
In the simple, general case, the extent of an element is indicated by a pair of tags: a "start
tag" <p> and "end tag" </p>. The text content of the element, if any, is placed between these
tags.
Tags may also enclose further tag markup between the start and end, including a mixture of tags
and text. This indicates further (nested) elements, as children of the parent element.
The start tag may also include attributes within the tag. These indicate other information, such as
identifiers for sections within the document, identifiers used to bind style information to the
presentation of the document, and for some tags such as the <img> used to embed images, the
reference to the image resource.
Some elements, such as the line break <br>, do not permit any embedded content, either text or
further tags. These require only a single empty tag (akin to a start tag) and do not use an end tag.
Many tags, particularly the closing end tag for the very commonly-used paragraph element <p>,
are optional. An HTML browser or other agent can infer the closure for the end of an element
from the context and the structural rules defined by the HTML standard. These rules are complex
and not widely understood by most HTML coders.
The general form of an HTML element is therefore: <tag attribute1="value1"
attribute2="value2">content</tag>. Some HTML elements are defined as empty elements and
take the form <tag attribute1="value1" attribute2="value2">. Empty elements may enclose no
content, for instance, the <br> tag or the inline <img>tag. The name of an HTML element is the
name used in the tags. Note that the end tag's name is preceded by a slash character, "/", and that
in empty elements the end tag is neither required nor allowed. If attributes are not mentioned,
default values are used in each case.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 13
Element examples
2.3.1 HEAD ELEMENT
Header of the HTML document:<head>...</head>. The title is included in the head, for example:
<head><title>The Title</title></head>
Fig: 2.3 Example for showing the title is included in the head.
:
<h1>Heading level 1</h1><h2>Heading level 2</h2><h3>Heading level 3</h3><h4>Heading level 4</h4><h5>Heading level 5</h5><h6>Heading level 6</h6>
Fig: 2.4 Headings: HTML headings are defined with the <h1> to <h6> tags
2.3.2 Paragraph
<p>Paragraph 1</p><p>Paragraph 2</p>
Fig: 2.5 Example using paragraph in code.
2.3.3. Break
Line breaks <br>. The difference between <br> and <p> is that "br" breaks a line without altering the semantic structure of the page, whereas "p" sections the page into paragraphs. Note also that "br" is an empty element in that, although it may have attributes, it can take no content and it may not have an end tag.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 14
<p>This<br> is a paragraph <br> with <br> line breaks</p>
Fig: 2.6 Showing difference between <p> and <br> elements.
This is a link in HTML. To create a link the <a> tag is used. The <href> attribute holds the URL address of the link.
<ahref="https://www.wikipedia.org/">A link to Wikipedia!</a>
Fig: 2.7 Example of <ahref> in code.
2.3.5 Comments
Comments can help in the understanding of the markup and do not display in the webpage.
<!-- This is a comment -->
Fig: 2.8 Example for using comment in code.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 15
CHAPTER 3
JAVASCRIPT
3.1 Introduction
JavaScript is the most popular programming language in the world.
This page contains some examples of what JavaScript can do.
3.2.1 JavaScript Can Change HTML Content
One of many HTML methods is getElementById().
This example uses the method to "find" an HTML element (with id="demo"), and changes the element content (inner HTML) to "Hello JavaScript":
Example :
document.getElementById("demo").innerHTML = "Hello JavaScript";
3.1.2 JavaScript Can Change HTML Styles (CSS)
Changing the style of an HTML element, is a variant of changing an HTML attribute:
Example
document.getElementById("demo").style.fontSize = "25px";
3.1.3 Syntax
Variables in JavaScript can be defined using the “var” keyword
varx;// defines the variable x, the special value “undefined” (not to be confused with an undefined value) is assigned to it by defaultvary=2;// defines the variable y and assigns the value of 2 to it
Fig: 3.1 Variables can be declared in above two ways.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 16
Note the comments in the example above, both of which were preceded with two forward
slashes.
There is no built-in I/O functionality in JavaScript; the run-time environment provides that,
indeed, there are no provisions in this specification for input of external data or output of
computed results.
However, most runtime environments have a console object that can be used to print output.
console.log("Hello World!");
Fig: 3.2 This is a minimalist Hello World program.
functionfactorial(n){if(n==0){return1;}returnn*factorial(n-1);}
Fig 3.3 A simple recursive function.
vardisplayClosure=function(){varcount=0;returnfunction(){return++count;};}varinc=displayClosure();inc();// returns 1inc();// returns 2inc();// returns 3
Fig: 3.4 Anonymous function (or lambda) syntax and closure example
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 17
varsum=function(){vari,x=0;for(i=0;i<arguments.length;++i){x+=arguments[i];}returnx;}sum(1,2,3);// returns 6
Fig: 3.5 Variadic function demonstration (arguments is a special variable).
3.2 Use in Web Pages
The most common use of JavaScript is to add client-side behavior to HTML pages,
a.k.a. Dynamic HTML (DHTML). Scripts are embedded in or included from HTML pages and
interact with the Document Object Model (DOM) of the page. Some simple examples of this
usage are:
Loading new page content or submitting data to the server via AJAX without reloading the
page (for example, a social network might allow the user to post status updates without
leaving the page)
Animation of page elements, fading them in and out, resizing them, moving them, etc.
Interactive content, for example games, and playing audio and video
Validating input values of a Web form to make sure that they are acceptable before being
submitted to the server.
Transmitting information about the user's reading habits and browsing activities to various
websites. Web pages frequently do this for web analytics, ad tracking,personalization or
other purposes.
Because JavaScript code can run locally in a user's browser (rather than on a remote server), the
browser can respond to user actions quickly, making an application more responsive.
Furthermore, JavaScript code can detect user actions that HTML alone cannot, such as individual
keystrokes. Applications such as Gmail take advantage of this: much of the user-interface logic
is written in JavaScript, and JavaScript dispatches requests for information (such as the content
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 18
of an e-mail message) to the server. The wider trend of Ajax programming similarly exploits this
strength.
A JavaScript engine (also known as JavaScript interpreter or JavaScript implementation) is an interpreter that interprets JavaScript source code and executes the script accordingly. The first JavaScript engine was created by Brendan Eich at Netscape Communications Corporation, for the Netscape Navigator web browser. The engine, code-named SpiderMonkey, is implemented in C. It has since been updated (in JavaScript 1.5) to conform to ECMA-262 Edition 3. The Rhino engine, created primarily by Norris Boyd (formerly of Netscape; now at Google) is a JavaScript implementation in Java. Rhino, like SpiderMonkey, is ECMA-262 Edition 3 compliant.
A web browser is by far the most common host environment for JavaScript. Web browsers typically create "host objects" to represent the Document Object Model (DOM) in JavaScript. The web server is another common host environment. A JavaScript web server would typically expose host objects representing HTTP request and response objects, which a JavaScript program could then interrogate and manipulate to dynamically generate web pages.
Because JavaScript is the only language that the most popular browsers share support for, it has become a target language for many frameworks in other languages, even though JavaScript was never intended to be such a language. Despite the performance limitations inherent to its dynamic nature, the increasing speed of JavaScript engines has made the language a surprisingly feasible compilation target.
3.3 Compatibility considerations
Because JavaScript runs in widely varying environments, an important part of testing and
debugging is to test and verify that the JavaScript works across multiple browsers.
The DOM interfaces for manipulating web pages are not part of the ECMA Script standard, or of
JavaScript itself. Officially, the DOM interfaces are defined by a separate standardization effort
by the W3C; in practice, browser implementations differ from the standards and from each other,
and not all browsers execute JavaScript.
To deal with these differences, JavaScript authors can attempt to write standards-compliant code
that will also be executed correctly by most browsers; failing that, they can write code that
checks for the presence of certain browser features and behaves differently if they are not
available. In some cases, two browsers may both implement a feature but with different
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 19
behavior, and authors may find it practical to detect what browser is running and change their
script’s behavior to match. Programmers may also use libraries or toolkits that take browser
differences into account.
use a PDA or mobile phone browser that cannot execute JavaScript,
have JavaScript execution disabled as a security precaution,
use a speech browser due to, for example, a visual disability.
To support these users, Web authors can try to create pages that degrade gracefully on user
agents (browsers) that do not support the page’s JavaScript. In particular, the page should remain
usable albeit without the extra features that the JavaScript would have added. An alternative
approach that many find preferable is to first author content using basic technologies that work in
all browsers, then enhance the content for users that have JavaScript enabled. This is known
as progressive enhancement.
<!DOCTYPE html>
<metacharset=”utf-8”><title>Minimal Example</title>
<h1id=”header”>This is JavaScript</h1>
<script>document.body.appendChild(document.createTextNode(‘Hello World!’));
varh1=document.getElementById(‘header’);// holds a reference to the <h1> tagh1=document.getElementsByTagName(‘h1’)[0];// accessing the same <h1> element</script>
<noscript>Your browser either does not support JavaScript, or has it turned off.</noscript>
Fig: 3.6 Example of Javascript.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 20
CHAPTER 4
CSS
4.1 Introduction
Cascading Style Sheets (CSS) is a style sheet language used for describing the look and
formatting of a document written in a markup language. Although most often used to change the
style of web pages and user interfaces written in HTML and XHTML, the language can be
applied to any kind of XML document, including plain XML, SVG and XUL. Along with
HTML and JavaScript, CSS is a cornerstone technology used by most websites to create visually
engaging webpages, user interfaces for web applications, and user interfaces for many mobile
applications.
CSS is designed primarily to enable the separation of document content from document
presentation, including elements such as the layout, colors, and fonts. This separation can
improve content accessibility, provide more flexibility and control in the specification of
presentation characteristics, enable multiple HTML pages to share formatting by specifying the
relevant CSS in a separate .css file, and reduce complexity and repetition in the structural
content, such as semantically insignificant tables that were widely used to format pages before
consistent CSS rendering was available in all major browsers. CSS makes it possible to separate
presentation instructions from the HTML content in a separate file or style section of the HTML
file. For each matching HTML element, it provides a list of formatting instructions. For example,
a CSS rule might specify that "all heading 1 elements should be bold", leaving pure semantic
HTML markup that asserts "this text is a level 1 heading" without formatting code such as a
<bold> tag indicating how such text should be displayed.
4.2 SyntaxCSS has a simple syntax and uses a number of English keywords to specify the names of various
style properties.
A style sheet consists of a list of rules. Each rule or rule-set consists of one or more selectors,
and a declaration block.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 21
4.2.1 Selector
In CSS, selectors are used to declare which part of the markup a style applies to by matching tags
and attributes in the markup itself. Selectors may apply to:
all elements of a specific type, e.g. the second-level headers h2
elements specified by attribute, in particular.
id: an identifier unique to the document.
class: an identifier that groups multiple elements in a document.
elements depending on how they are placed relative to others in the document tree.
Classes and IDs are case-sensitive, start with letters, and can include alphanumeric characters
and underscores. Any number of instances of any number of elements may have the same class.
Conventionally, IDs only apply to one instance of one element.
Pseudo-classes are used in CSS selectors to permit formatting based on information that is not
contained in the document tree. One example of a widely used pseudo-class is:hover, which
identifies content only when the user 'points to' the visible element, usually by holding the mouse
cursor over it. It is appended to a selector as in a:hover or #elementid:hover. A pseudo-class
classifies document elements, such as:link or :visited whereas a pseudo-element makes a
selection that may consist of partial elements, such as first:line or first:letter.
Selectors may be combined in many ways to achieve great specificity and flexibility. Multiple
selectors may be joined in a spaced list to specify elements by location, element type, id, class, or
any combination thereof.
4.3 Use
Before CSS, nearly all of the presentational attributes of HTML documents were contained
within the HTML markup; all font colors, background styles, element alignments, borders and
sizes had to be explicitly described, often repeatedly, within the HTML. CSS allows authors to
move much of that information to another file, the style sheet, resulting in considerably simpler
HTML.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 22
For example, headings (h1 elements), sub-headings (h2), sub-sub-headings (h3) , etc., are
defined structurally using HTML. In print and on the screen, choice of font, size,
color and emphasis for these elements is presentational.
Before CSS, document authors who wanted to assign such typographic characteristics to, say, all
h2 headings had to repeat HTML presentational markup for each occurrence of that heading
type. This made documents more complex, larger, and more error-prone and difficult to
maintain. CSS allows the separation of presentation from structure. CSS can define color, font,
text alignment, size, borders, spacing, layout and many other typographic characteristics, and can
do so independently for on-screen and printed views. CSS also defines non-visual styles such as
the speed and emphasis with which text is read out by aural text readers. The W3C has
now deprecated the use of all presentational HTML markup.
<h1><fontcolor="red"> Chapter 1. </font></h1>
Fig: 4.1 For example, under pre-CSS HTML, a heading element defined with red text.
Using CSS, the same element can be coded using style properties instead of HTML presentational attributes:
<h1style="color:red"> Chapter 1. </h1>
Fig: 4.2 Above Example shows how style replaces font .
<linkhref="path/to/file.css"rel="stylesheet">
Fig: 4.3 An "external" CSS file, as described above, can be associated with an HTML document using the following syntax.
<style>
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 23
Fig: 4.3 Above Example show an internal CSS code can be typed in the head section of the code. The coding is started with the style tag.
<!DOCTYPE html><html><head><metacharset="utf-8"><style>#xyz{ color:red }</style></head><body><pid="xyz"style="color: blue">To demonstrate specificity </p></body></html>
Fig: 4.4 Example of CSS
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 24
CHAPTER 5
JQUERY AND BOOTSTRAP
5.1 Introduction Of JQuery
JQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML. JQuery is the most popular JavaScript library in use today, with installation on 65% of the top 10 million highest-trafficked sites on the Web. JQuery is free, open-source software licensed under the MIT License.
jQuery's syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications. JQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library. This enables developers to create abstractions for low-level interaction and animation, advanced effects and high-level, theme-able widgets. The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications.
The set of jQuery core features DOM element selections, traversal and manipulation—enabled by its selector engine created a new "programming style", fusing algorithms and DOM data structures. This style influenced the architecture of other JavaScript frameworks like YUI v3 and Dojo, later stimulating the creation of the standard Selectors API.
Microsoft and Nokia bundle jQuery on their platforms. Microsoft includes it with Visual Studio for use within Microsoft's ASP.NET AJAX framework and ASP.NET MVC Framework while Nokia has integrated it into the Web Run-Time widget development platform. JQuery has also been used in MediaWiki since version 1.16.
5.2 Features
jQuery includes the following features:
DOM element selections using the multi-browser open source selector engine Sizzle, a spin-
off of the jQuery project.
DOM manipulation based on CSS selectors that uses elements' names and attributes, such as
id and class, as criteria to select nodes in the DOM
Events
Effects and animations
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 25
AJAX
Deferred and Promise objects to control asynchronous processing
JSON parsing
Extensibility through plug-ins
Utilities, such as feature detection
Compatibility methods that are natively available in modern browsers but need fall backs for
older ones, such as in Array()
Multi-browser (not to be confused with cross-browser) support
5.3 Browser support
Both versions 1.x and 2.x of jQuery support "current-1 versions" (meaning the current stable version of the browser and the version that preceded it) of Firefox, Chrome, Safari, and Opera. Version 1.x also supports Internet Explorer 6 or higher. However, jQuery version 2.x dropped Internet Explorer 6–8 support (which represents less than 28% of all browsers in use) and supports only IE 9 and later versions.
5.4 Usage
The jQuery library is a single JavaScript file containing all of its common DOM, event, effects, and Ajax functions. It can be included within a web page by linking to a local copy or to one of the many copies available from public servers. jQuery has a CDN hosted by Max CDN . Google and Microsoft host it as well.
<script src="jquery.js"></script>
Fig: 5.1 Example to write jQuery in script.
It is also possible to include jQuery directly from content delivery networks. (The link starting with // is protocol relative URL.).
<scriptsrc="//code.jquery.com/jquery-1.11.1.min.js"></script>
Fig : 5.2 Including jQuery directly .
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 26
5.4.1 Usage styles
jQuery has two usage styles:
Via the $ function, which is a factory method for the jQuery object. These functions, often called commands, are chainable as they all return jQuery objects.
Via $-prefixed functions. These are utility functions, which do not act upon the jQuery object directly.
Access to and manipulation of multiple DOM nodes in jQuery typically begins with calling the $ function with a CSS selector string. This returns a jQuery object referencing all the matching elements in the HTML page. For example, returns a jQuery object with all the div elements of class test. This node set can be manipulated by calling methods on the returned jQuery object or on the nodes themselves.
No-Conflict Mode
JQuery also includes noConflictmode() which relinquishes control of $. This can be helpful if jQuery is used with other libraries that also use $ as an identifier. In no-conflict mode, developers can use jQuery as a replacement for $ without losing functionality.
Typical start-point
The typical jQuery usage is to put initialization code and event handling functions in ready(). This is triggered when the browser has constructed the DOM and sends a load event.
<scripttype="text/javascript">$(document).ready(function(){// jQuery code, event handling callbacks here});</script>
Fig: 5.3 Example of typical start point.
Callback functions for event handling are also included inside ready() as anonymous functions but called when the event for the callback is triggered. For example, the following jQuery code adds an event handler for a mouse click on an <img> image element.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 27
$(document).ready(function(){$('img').click(function(){// handle the click event on any img element in the page});});
Fig: 5.4 Example to show events.
The following syntaxes are equivalent: $(document).ready(handler) $(handler)
5.5 Bootstrap Introduction
Bootstrap is a free and open-source collection of tools for creating websites and web applications. It contains HTML- and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions. It aims to ease the development of dynamic websites and web applications.
Bootstrap is a front end framework, that is, an interface for the user, unlike the server-side code which resides on the "back end" or server.
As of June 2015, it was the most-starred project on GitHub, with over 81,000 stars and more than 32,000 forks.
5.6 Structure and function
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 28
Fig: 5.5 Example of a webpage using Bootstrap framework rendered in Mozilla Firefox.
Bootstrap is modular and consists essentially of a series of LESS stylesheets that implement the
various components of the toolkit. A stylesheet called bootstrap less includes the components
stylesheet.. Developers can adapt the Bootstrap file itself, selecting the components they wish to
use in their project.
Adjustments are possible to a limited extent through a central configuration stylesheet. More
profound changes are possible by the LESS declarations.
The use of LESS stylesheet language allows the use of variables, functions and operators, nested
selectors, as well as so-called mixins.
Since version 2.0, the configuration of Bootstrap also has a special "Customize" option in the
documentation. Moreover, the developer chooses on a form the desired components and adjusts,
if necessary, the values of various options to their needs. The subsequently generated package
already includes the pre-built CSS style sheet.
Grid system and responsive design comes standard with a 1170 pixel wide, grid layout.
Alternatively, the developer can use a variable-width layout. For both cases, the toolkit has four
variations to make use of different resolutions and types of devices: mobile phones, portrait and
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 29
landscape, tablets and PCs with low and high resolution. Each variation adjusts the width of the
columns.
The CSS :
Bootstrap provides a set of stylesheets that provide basic style definitions for all key HTML
components. These provide a uniform, modern appearance for formatting text, tables and form
elements.
Re-usable components :
In addition to the regular HTML elements, Bootstrap contains other commonly used interface
elements. These include buttons with advanced features (e.g. grouping of buttons or buttons with
drop-down option, make and navigation lists, horizontal and vertical tabs, navigation,
breadcrumb navigation, pagination, etc.), labels, advanced typographic capabilities, thumbnails,
warning messages and a progress bar. The components are implemented as CSS classes, which
must be applied to certain HTML elements in a page.
JavaScript components :
Bootstrap comes with several JavaScript components in the form of jQuery plugins. They
provide additional user interface elements such as dialog boxes, tooltips, and carousels. They
also extend the functionality of some existing interface elements, including for example an auto-
complete function for input fields. In version 2.0, the following JavaScript plugins are supported:
Modal, Dropdown, and Scroll spy, Tab, Tooltip, Popover, Alert, Button, Collapse, Carousel and
Type ahead.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 30
CHAPTER 6
PHP And MYSQL
6.1 Introduction
MySQL (My S-Q-L",officially, also "My Sequel") is a relational database management
system(RDBMS).[7] In July 2013 it was the world's second most widely used RDBMS, and the
most widely used open-source RDBMS. It is named after co-founder Michael Widenius's
daughter, My. The SQL acronym stands for Structured Query Language. The MySQL
development project has made its source code available under the terms of the GNU General
Public License, as well as under a variety of proprietary agreements. MySQL was owned and
sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Oracle
Corporation.[12] For proprietary use, several paid editions are available, and offer additional
functionality.
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 (and other 'AMP' stacks).
LAMP is an acronym for "Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open
source projects that require a full-featured database management system often use MySQL.
Applications that use the MySQL database include: TYPO3, MODx, Joomla, WordPress,
phpBB, MyBB, Drupal and other software. MySQL is also used in many high-profile, large-
scale websites, including Google (though not for searches), Facebook,
Twitter, Flickr, and YouTube.
On all platforms except Windows, MySQL ships with no GUI tools to administer MySQL
databases or manage data contained within the databases. Users may use the included command
line tools, or install MySQL Workbench via a separate download. Many third party GUI tools
are also available.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 31
6.2 History
MySQL was created by a Swedish company, MySQL AB, founded by David Axmark, Allan Larsson and Michael "Monty" Widenius. The first version of MySQL appeared on 23 May 1995. It was initially created for personal usage from MySQL based on the low-level language ISAM, which the creators considered too slow and inflexible. They created a new SQL interface, while keeping the same API as MySQL. By keeping the API consistent with the MySQL system, many developers were able to use MySQL instead of the (proprietarily licensed) MySQL antecedent
6.3 Milestones
Notable milestones in MySQL development include:
Original development of MySQL by Michael Widenius and David Axmark beginning in 1994
First internal release on 23 May 1995 Version 3.19: End of 1996, from www.tcx.se Version 3.20: January 1997 Windows version was released on 8 January 1998 for Windows 95 and NT Version 3.21: production release 1998, from www.mysql.com Version 3.22: alpha, beta from 1998 Version 3.23: beta from June 2000, production release 22 January 2001 Version 4.0: beta from August 2002, production release March 2003 (unions) Version 4.01: beta from August 2003, Jyotiadopts MySQL for database tracking Version 4.1: beta from June 2004, production release October 2004 (R-trees and B-trees,
subqueries, prepared statements) Version 5.0: beta from March 2005, production release October 2005 (cursors, stored
procedures, triggers, views, XA transactions)The developer of the Federated Storage Engine states that "The Federated Storage Engine is a proof-of-concept storage engine",[34] but the main distributions of MySQL version 5.0 included it and turned it on by default. Documentation of some of the short-comings appears in "MySQL Federated Tables: The Missing Manual".
Sun Microsystems acquired MySQL AB in 2008. Version 5.1: production release 27 November 2008 (event scheduler, partitioning, plugin
API, row-based replication, server log tables)
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 32
Version 5.1 contained 20 known crashing and wrong result bugs in addition to the 35 present in version 5.0 (almost all fixed as of release 5.1.51). MySQL 5.1 and 6.0-alpha showed poor performance when used for data warehousing – partly due to its inability to utilize multiple CPU cores for processing a single query.
Oracle acquired Sun Microsystems on 27 January 2010. The day Oracle announced the purchase of Sun, Michael "Monty" Widenius
forked MySQL, launching MariaDB, and took a swath of MySQL developers with him.
MySQL Server 5.5 was generally available (as of December 2010). Enhancements and features include: The default storage engine is InnoDB, which supports transactions and
referential integrity constraints. Improved InnoDB I/O subsystem Improved SMP support Semisynchronous replication. SIGNAL and RESIGNAL statement in compliance with the SQL standard. Support for supplementary Unicode character sets utf16, utf32, and utf8mb4. New options for user-defined partitioning.
MySQL Server 6.0.11-alpha was announced on 22 May 2009 as the last release of the 6.0 line. Future MySQL Server development uses a New Release Model. Features developed for 6.0 are being incorporated into future releases.
MySQL 5.6 general availability was announced in February 2013. New features included performance improvements to the query optimizer, higher transactional throughput in InnoDB, new NoSQL-style memcached APIs, improvements to partitioning for querying and managing very large tables, TIMESTAMP column type that correctly stores milliseconds, improvements to replication, and better performance monitoring by expanding the data available through the PERFORMANCE_SCHEMA. The InnoDB storage engine also included support for full text search and improved group commit performance.
MySQL 5.7 Development Milestone 3 was released December 2013
6.4 MySql Functions
mysql_affected_rows — Get number of affected rows in previous MySQL operation mysql_client_encoding — Returns the name of the character set
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 33
mysql_close — Close MySQL connection mysql_connect — Open a connection to a MySQL Server mysql_create_db — Create a MySQL database mysql_data_seek — Move internal result pointer mysql_db_name — Retrieves database name from the call to mysql_list_dbs mysql_db_query — Selects a database and executes a query on it mysql_drop_db — Drop (delete) a MySQL database mysql_errno — Returns the numerical value of the error message from previous MySQL
operation mysql_error — Returns the text of the error message from previous MySQL operation mysql_escape_string — Escapes a string for use in a mysql_query mysql_fetch_array — Fetch a result row as an associative array, a numeric array, or both mysql_fetch_assoc — Fetch a result row as an associative array mysql_fetch_field — Get column information from a result and return as an object mysql_fetch_lengths — Get the length of each output in a result mysql_fetch_object — Fetch a result row as an object mysql_fetch_row — Get a result row as an enumerated array mysql_field_flags — Get the flags associated with the specified field in a result mysql_field_len — Returns the length of the specified field mysql_field_name — Get the name of the specified field in a result mysql_field_seek — Set result pointer to a specified field offset mysql_field_table — Get name of the table the specified field is in mysql_field_type — Get the type of the specified field in a result mysql_free_result — Free result memory mysql_get_client_info — Get MySQL client info mysql_get_host_info — Get MySQL host info mysql_get_proto_info — Get MySQL protocol info mysql_get_server_info — Get MySQL server info mysql_info — Get information about the most recent query mysql_insert_id — Get the ID generated in the last query mysql_list_dbs — List databases available on a MySQL server mysql_list_fields — List MySQL table fields mysql_list_processes — List MySQL processes mysql_list_tables — List tables in a MySQL database mysql_num_fields — Get number of fields in result
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 34
mysql_num_rows — Get number of rows in result mysql_pconnect — Open a persistent connection to a MySQL server mysql_ping — Ping a server connection or reconnect if there is no connection mysql_query — Send a MySQL query mysql_real_escape_string — Escapes special characters in a string for use in an SQL
statement mysql_result — Get result data mysql_select_db — Select a MySQL database mysql_set_charset — Sets the client character set mysql_stat — Get current system status mysql_tablename — Get table name of field mysql_thread_id — Return the current thread ID mysql_unbuffered_query — Send an SQL query to MySQL without fetching and
buffering the result rows.
6.5 MySql Commands
To login (from unix shell) use -h only if needed.
# [mysqldir]/bin/mysql -h hostname -u root -p
Create a database on the sql server.
mysql> create database [databasename];
List all databases on the sql server.
mysql> show databases;
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 35
Switch to a database.
mysql> use [db name];
To see all the tables in the db.
mysql> show tables;
To see database's field formats.
mysql> describe [table name];
To delete a db.
mysql> drop database [database name];
To delete a table.
mysql> drop table [table name];
Show all data in a table.
mysql> SELECT * FROM [table name];
Returns the columns and column information pertaining to the designated table.
mysql> show columns from [table name];
Show certain selected rows with the value "whatever".
mysql> SELECT * FROM [table name] WHERE [field name] = "whatever";
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 36
Show all records containing the name "Bob" AND the phone number '3444444'.
mysql> SELECT * FROM [table name] WHERE name = "Bob" AND phone_number = '3444444';
Show all records not containing the name "Bob" AND the phone number '3444444' order by the phone_number field.
mysql> SELECT * FROM [table name] WHERE name != "Bob" AND phone_number = '3444444' order by phone_number;
Show all records starting with the letters 'bob' AND the phone number '3444444'.
mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444';
Show all records starting with the letters 'bob' AND the phone number '3444444' limit to records 1 through 5.
mysql> SELECT * FROM [table name] WHERE name like "Bob%" AND phone_number = '3444444' limit 1,5;
Use a regular expression to find records. Use "REGEXP BINARY" to force case-sensitivity. This finds any record beginning with a.
mysql> SELECT * FROM [table name] WHERE rec RLIKE "^a";
Show unique records.
mysql> SELECT DISTINCT [column name] FROM [table name];
Show selected records sorted in an ascending (asc) or descending (desc).
mysql> SELECT [col1],[col2] FROM [table name] ORDER BY [col2] DESC;
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 37
Return number of rows.
mysql> SELECT COUNT(*) FROM [table name];
Sum column.
mysql> SELECT SUM(*) FROM [table name];
Join tables on common columns.
mysql> select lookup.illustrationid, lookup.personid,person.birthday from lookup left join person on lookup.personid=person.personid=statement to join birthday in person table with primary illustration id;
Creating a new user. Login as root. Switch to the MySQL db. Make the user. Update privs.
# mysql -u root -pmysql> use mysql;mysql> INSERT INTO user (Host,User,Password) VALUES('%','username',PASSWORD('password'));mysql> flush privileges;
Change a users password from unix shell.
# [mysqldir]/bin/mysqladmin -u username -h hostname.blah.org -p password 'new-password'
Change a users password from MySQL prompt. Login as root. Set the password. Update privs.
# mysql -u root -pmysql> SET PASSWORD FOR 'user'@'hostname' = PASSWORD('passwordhere');mysql> flush privileges;
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 38
Recover a MySQL root password. Stop the MySQL server process. Start again with no grant tables. Login to MySQL as root. Set new password. Exit MySQL and restart MySQL server.
# /etc/init.d/mysql stop# mysqld_safe --skip-grant-tables &# mysql -u rootmysql> use mysql;mysql> update user set password=PASSWORD("newrootpassword") where User='root';mysql> flush privileges;mysql> quit# /etc/init.d/mysql stop# /etc/init.d/mysql start
Set a root password if there is on root password.
# mysqladmin -u root password new password
6.6 PHP Introduction
PHP is a server-side scripting language created in 1995 and 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 Rasmus Lerdorf 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 backronym.
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 the resulting output to its client, usually in the 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
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 39
data. PHP has also evolved to include a command-line interface (CLI) capability and can be used
in standalone graphical applications.
The standard PHP interpreter, powered by the Zend Engine, is free software released under
the PHP License. PHP has been widely ported and can be deployed on most web servers on
almost every operating system and platform, free of charge.
Despite its popularity, no written specification or standard existed for the PHP language until
2014, leaving the canonical PHP interpreter as a de facto standard. Since 2014, there is ongoing
work on creating a formal PHP specification.
PHP development began in 1994 when Rasmus Lerdorf wrote a series of Common Gateway
Interface (CGI) binaries in C, which he used to maintain his personal homepage. He extended
them to add the ability to work with web forms and to communicate with databases, and called
this implementation "Personal Home Page/Forms Interpreter" or PHP/FI.
6.6 Syntax
Main article: PHP syntax and semantics
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>
Fig: 6.1 Code in PHP.
The PHP interpreter only executes PHP code within its delimiters. Anything outside its delimiters is not processed by PHP (although non-PHP text is still subject to control
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 40
structures described in PHP code). The most common delimiters are <?php to open and ?> to close PHP sections. There are also the shortened forms <? Or <?= (which is used to echo back a string or variable) 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,<? 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.
Variables are prefixed with a dollar symbol, and a type does not need to be specified in advance. PHP 5 introduced type hinting that allows functions to force their parameters to be objects of a specific class, arrays, interfaces or callback functions. However, before PHP 7.0, type hints could not be used with scalar types such as integer or string.
Unlike function and class names, variable names are case sensitive. Both double-quoted(“”) and heredoc strings provide the ability to interpolate a variable's value into the string. PHP treats newlines as whitespace in the manner of a free-form language, and statements are terminated by a semicolon. PHP has three types of comment syntax(/**/)marks block and inline comments; //as well as # are used for one-line comments. The echo statement is one of several facilities PHP provides to output text,e.g., to a web browser.
In terms of keywords and language syntax, PHP is similar to most high level languages that follow the C style syntax. If conditions, for and while loops, and function returns are similar in syntax to languages such as C, C++, C#, Java and Perl.
6.7 PHP Functions
PHP has hundreds of functions provided by the core language functionality and thousands more available via various extensions; these functions are well documented in the online PHP documentation. However, the built-in library has a wide variety of naming conventions and associated inconsistencies, as described under history above.
functionmyAge($birthYear){// defines a function, this one is named "myAge"$yearsOld=date('Y')-$birthYear;// calculates the agereturn$yearsOld.' year'.($yearsOld!=1?'s':'');// returns the age in a descriptive form}
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 41
echo'I am currently '.myAge(1981).' old.';// outputs the text concatenated// with the return value of myAge()// As the result of this syntax, myAge() is called.// In 2015, the output of this sample program will be 'I am currently 34 years old.'
Fig: 6.2 :Additional functions can be defined by the developer.
In PHP, normal functions are not first-class and can only be referenced by their name directly, or
dynamically by a variable containing the name of the function (referred to as "variable
functions"). User-defined functions can be created at any time without
being prototyped. Functions can be defined inside code blocks, permitting a run-time decision as
to whether or not a function should be defined. Function calls must use parentheses, with the
exception of zero-argument class constructor functions called with the PHP new operator, where
parentheses are optional.
Until PHP 5.3, support for true anonymous functions or closures did not exist in PHP. While
create_function() exists since PHP 4.0.1, it is merely a thin wrapper around eval() that allows
normal PHP functions to be created during program execution. Also, support for variable
functions allows normal PHP functions to be used, for example, as callbacks or within function
tables..
functiongetAdder($x){returnfunction($y)use($x){return$x+$y;};}
$adder=getAdder(8);echo$adder(2);// prints "10"
Fig: 6.3 PHP 5.3 added support for closures, which are true anonymous, first-class functions, whose syntax can be seen in the above example.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 42
In the example above, getadder() function creates a closure using passed argument $x (the
keyword use() imports a variable from the lexical context), which takes an additional argument
&y , and returns the created closure to the caller. Such a function is a first-class object, meaning
that it can be stored in a variable, passed as a parameter to other functions, etc.
Unusually for a dynamic language, PHP supports type declarations on function parameters,
which are enforced at runtime. This has been supported for classes and interfaces since PHP 5.0,
for arrays since PHP 5.1, for "callables" since PHP 5.4, and will be supported for scalar (integer,
float, string and boolean) types in PHP 7.0. PHP 7.0 will also introduce type declarations for
function return types, expressed by placing the type name after the list of parameters, preceded
by a colon. For example, th getAdder function , from the earlier example could be annotated
with types like so in PHP 7:
functiongetAdder(int$x):\Closure{returnfunction(int$y)use($x):int{return$x+$y;};}
$adder=getAdder(8);echo$adder(2);// prints "10"echo$adder(null);// throws an exception because an incorrect type was passed$adder=getAdder([]);// would also throw an exception
Fig :6.4
By default, scalar type declarations follow weak typing principles. So, for example, if a
parameter's type is int , PHP would allow not only integers, but also convertible numeric strings,
floats or booleans to be passed to that function, and would convert them. However, PHP 7 will
add a "strict typing" mode which, when used, disallows such conversions for function calls and
returns within a file.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 43
6.8 Use
Fig : 6.5 A broad overview of the LAMP software bundle, displayed here together with Squid.
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. 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 or binary data such as image or audio formats. Since PHP 4, the PHP parser compiles input to produce byte-code for 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. PHP has also attracted the development of many software frameworks that provide building blocks and a design structure to promote rapid application development (RAD).
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 44
Some of these include PRADO, CakePHP,Symfony, CodeIgniter, Laravel, Yii Framework, Phalcon and Zend Framework, offering features similar to other web application frameworks.
The LAMP architecture has become popular in the web industry as a way of deploying web applications. As of April 2007, over 20 million Internet domains had web services hosted on servers with PHP installed and mod_php was recorded as the most popular Apache HTTP Server module. As of October 2010, PHP was used as the server-side programming language on 75% of all websites whose server-side programming language was known (as of February 2014, the percentage had reached 82%and PHP was the most-used open source software within enterprises. Web content management systems written in PHP include MediaWiki, Joomla,eZ Publish, SilverStripe, WordPress, Drupal, Moodle the user-facing portion of Facebook, Known and Digg.
For specific and more advanced usage scenarios, PHP offers a well defined and documented way for writing custom extensions in C or C++. Besides extending the language itself in form of additional libraries, extensions are providing a way for improving execution speed where it is critical and there is room for improvements by using a true compiled language.[164][165] PHP also offers well defined ways for embedding itself into other software projects. That way PHP can be easily used as an internal scripting language for another project, also providing tight interfacing with the project's specific internal data structures.
PHP received mixed reviews due to lacking support for multithreading at the core language level, though using threads is made possible by the "pthreads" PECLextension
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 45
CHAPTER 7
PANELS
7.1 Introduction
A panel is "a particular arrangement of information grouped together for presentation to users in
a window or pop-up." In ISPF, a panel is "a predefined display image that you see on a display
screen."
A panel graphical control element is commonly packaged as part of a widget toolkit (libraries
that contain a collection of graphical control elements) for a graphical user interface.
See toolbar and dialog box.
Fig: 7.1 Example of Panel.
In computer program development, a panel is a representation of what information will be sent to a user's display screen in given circumstances. Typically, when designing a program, the user interface is specified by portraying what information (text and pictures) will be presented to the user at different stages of using the program. For example, each menu, help page, or other form of content constitutes a panel of information that is to be implemented by developers and tested by early users. Since most applications are developed against the context of an operating system graphical user interface (GUI ), these elements can sometimes be assumed in describing specific panels. Generally, in a windowed user interface, a panel is designed for each window of information.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 46
CHAPTER 8 Project Description
8.1 Introduction
We have developed a project on “Online Dispensary Management System” on a PHP
platform. This project is about an online medical site which is open for all. The interface is very
user-friendly. The data are well protected for personal use and makes the data processing very
fast.The project is based on the database, object oriented and networking techniques. As there are
many areas where we keep the records in database for which we are using MY SQL software
which is one of the best and the easiest software to keep our information. This project uses PHP
as the front-end software and has connectivity with MY SQL.Our Project includes registrations
of members, storing their detail. Registered members then check the details of the doctors which
are on duty, their schedule, medicines available on medical store. There is a contact page
available which includes the detail of all the departments. Admin can update the details like
contact no or E-mail_id accordingly.Clients can also request for the change of password which
will be updated in the database. Only admin can make any changes to the portal other than
personal details of the clients. The details of all the clients are stored in the database. Other than
this there is also an enquiry form and subscribe form provided for clients. We have worked on
the languages such as HTML (Hypertext Markup Language), CSS (Cascading Style Sheets),
Javascript, Jquery. For Database we have worked on MySql platform. We have used the software
like Dreamweaver CC, Wamp.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 47
Fig: 8.1 Home page of our website.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 48
8.2 Details About The Project
8.2.1 Information Page
Information Page consist of further two links
1. On Duty Doctor
Client can access this page for checking on duty doctor for treatment procedure.
Details of all the doctor will be available here.
Fig 8.3 OnDuty doctors .
2. Medical StoreClient will access this page if he wants to get information about any medicines or if he wants
to get any medicine prescribed by doctor.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 49
Fig: 8.4 Example of Slider .
Fig : 8.5 Screenshot about Medical store on website.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 50
Fig: 8.6 Medicines available on website.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 51
8.2.3 Contact Page
For any further query clients can access this page. Contact Page consist of contact of all the departments of dispensary.
Fig : 8.7 Screenshot of Contact Page ofwebsite.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 52
Fig: 8.8 Contact details of Doctors .
8.2.4 Login Page
Client can Access login page for login into the portal of Dispensary management. If he is not
already the registered user then client can sign up for that and can access further.
1)Admin Side
Admin will access this page for maintaining the records of all the registered users in the
database. Admin will also provide the facility of changing the password to client if in case he
forgot the password or wishes to change the password.
Fig : 8.9 Admin Login Page .
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 53
2)User side
Fig : 8.10 User Login Page
8.2.5 Footer
Our Footer consist of 3 parts. In first part there is a gallery in which there is the collection of images. Second part consist of contact address of dispensary with the name of contact person. Third part consist of Subscribe form and contact icons.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 54
Fig : 8.11 Footer of website.
8.3 MySQL
MySQL is a collection of different databases. Example my_data1 consist of tables like
admin_login, user_login, user_profile.
Fig : 8.12 Admin_login table consist of user_id and Password of admin.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 55
Fig : 8.13 User_profile consist of all the details of clients.
8.3.1 Admin Panel
It is the gateway to managing your websites from the simple email setup to advanced server
management. We can configure anything to everything about your websites on your admin
panel.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 56
Fig : 8.14 Admin Panel of website.
View Profile
In this all the details of the patients will be displayed from the database.
Fig : 8.15 View profile from admin .
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 57
Change Password
Admin can change its password which will be reflected to the database.
Fig : 8.16 Screenshot of Changing password page.
8.3.2 Client Panel/User Panel
Client Web Panels are part of Stash's Client Web Fragment family of modules. They parallel the
functionality of Web Panels, but are rendered dynamically in the browser.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 58
Fig: 8.17 User Panel of website.
8.4 Software used
We have worked on the software Dreamweaver and Wamp.
8.4.1 AdobeDreamweaver
It is a proprietary web development tool developed by Adobe Systems. Dreamweaver was
created byMacromedia in 1997, and was maintained by them until Macromedia was acquired by
Adobe Systems in 2005.
Adobe Dreamweaver is available for OS X and for Windows.
Following Adobe's acquisition of the Macromedia product suite, releases of Dreamweaver
subsequent to version 8.0 have been more compliant with W3C standards. Recent versions have
improved support for Web technologies such as CSS,JavaScript, and various server-side
scripting languages and frameworks including ASP (ASP JavaScript, ASP VBScript, ASP.NET
C#, ASP.NET VB), ColdFusion, Scriptlet, and PHP.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 59
Fig: 8.18 Code in Adobe Dreamweaver(html page).
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 60
Fig: 8.18 Screenshot of code in Adobe Dreamweaver (CSS page).
8.4.2 Wamp
WAMP, "Windows, Apache, MySQL, and PHP", an application server platform.
WAMP may also refer to:
WAMP (FM), a radio station (88.1 FM) licensed to Jackson, Tennessee, United States Web Application Messaging Protocol, a network protocol that provides Remote Procedure
Calls and Publish & Subscribe in oneWebSocket based protocol.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 61
CONCLUSION
The summer training at Genx Soft Technologies, JAIPUR has been a unique experience for me
as it helped me to acquire practical knowledge and trends.
The practical training at Genx Soft Technologies, JAIPUR, provided me a golden opportunity to
increase my knowledge in Web Designing and Web Development. W we have learnt the use of
software Dreamweaver which we have not used before. It also helps me to increase the basic
knowledge of HTML, CSS and all the other platforms on which we have worked. This 45 days
training was very helpful for us in clearing our concept and helps us to learnt new concepts.
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 62
REFERENCES
http://genxsoftindia.com/ http://www.w3schools.com/html/ https://www.codecademy.com/courses/web-beginner-en-StaFQ/0/1?
curriculum_id=5124ef4c78d510dd89003eb8 http://www.w3schools.com/php/default.asp http://www.quirksmode.org/js/intro.html
Suchita Chaudhary/CSE/SPSU/Genx/2015-16/Page 63