training report on php mysql

Upload: ktik11

Post on 14-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 Training Report on pHp mysql

    1/23

    1

    Chapter 1 - ABOUT GRRAS

    1.1 NAME OF THE INSTITUTE

    GRRAS Solutions Pvt. Ltd.

    219, Himmat Nagar,

    Gopalpura Turn, Tonk Road, Jaipur (Raj.)

    CONTACT PERSON

    Mr Akhilesh Jain (Manager)

    1.2 INTRODUCTION

    Refining the tenor of success and excellence, GRRAS is a conspicuous name among Linux

    training providers of country. GRRAS complete and advanced Linux courses add new feather

    to the success wing of IT professionals. GRRAS has removed the gap between theoretical

    Linux courses and practical knowledge of field by providing high quality real time Linux

    training.

    Grras is known for providing high quality and easy to grasp Linux training courses and

    tutorials .With several years of experience and expertise in Linux training industry, GRRAS

    has set benchmark for others through its comprehensive Linux courses across country.

    GRRAS is taking bask of having faculties of RHCSS rank.

    GRRAS is a renowned Linux training centre and authorized Linux training partner of Red

    Hat.

    Apart from RHCA/RHCSA/RHCSS training Grras also provides training in Networking

    providing CCNA/CCNP certification.

    GRRAS has come into existence as an end-to-end web solution provider in the international

    market. Located in Jaipur, India, the company is renowned for providing top-notch

    technology that any web-based project requires.

  • 7/30/2019 Training Report on pHp mysql

    2/23

    2

    At GRRAS, you will get a wide range of enterprise level solutions at an affordable price.

    Since inception, Grras is providing incomparable web solutions and services that established

    us as a leading brand in the industry.

    Grras is a leading web hosting service provider of India. As a web solution provider Grras

    also provides Search Engine Optimization (SEO) services along with web development using

    php and mysql.

  • 7/30/2019 Training Report on pHp mysql

    3/23

    3

    Chapter 2THE PROBLEM DEFINITIONS

    This software is designed to serve the Business Operations/Marketing Analysis of an

    Manufacturing/Marketing Organization .This software efficiently promotes Business for

    organizations with least technical knowledge.

    2.1 OBJECTIVE

    The objective of software is to promote business by automating the process of:

    Managing the software contents without technical knowledge.

    Direct consumer communication. Secure flow of data in the hierarchy maintaining data integrity.

    The software deals with an Admin Panel designed for a single user who is not a technocrate

    but a business person though providing secure and consistent data.

    2.2SOFTWARE DESIGN AND COMPONENTS

    The design of software is such that there will be two levels/components, one is user level and

    other is Admin level. The users can query their requirements and the admin will be notified.

    Admin can change the contents of the user view.

    2.3 FUNCTIONAL REQUIREMENTS

    VALIDATIONS

    Admin will have a Username and a Password, and will be given access to the application only

    after matching these values. Login will be denied if the admin is not validated after matching

    Username and Password from the Database. Appropriate message will be given to the Admin.

    It will ensure the application is secure as only Admin will be given Access, to protect

    application, from being accessed by any Invalid user and hence ensuring important data from

    being accessed or even tampered. The Admin is also allowed for a three time trial, after that

    he cannot access the login page.

  • 7/30/2019 Training Report on pHp mysql

    4/23

    4

    SECURITY

    Security is maintained at single level that is the Admin level, who can modify the whole user

    view. Secure login sessions and User name password matching authentication provides the

    level of security needed. No user can modify the contents of the software. Secure sessions do

    not allow viewing pages even by providing the link .An advancement for security is the

    CAPTCHA authentication, in which if captcha matches then only the queries of user will be

    entertained. Captcha is used to prevent filling of database by bots.

  • 7/30/2019 Training Report on pHp mysql

    5/23

    5

    Chapter 3LANGUAGE OF IMPLEMENTATION

    3.1 INTRODUCTION TO PHP

    PHP is a widely-used general-purpose scripting language that is especially suited for Web

    development and can be embedded into HTML[1]. PHP is the Web Development Language

    written by and for Web developers. PHP stands for PHP: Hypertext Preprocessor. The

    product was originally named Personal Home Page Tools, and many people still think that`s

    what the acronym stands for. But as it expanded in scope, a new and more appropriate name

    was selected by community vote. PHP is a server-side scripting language, which can be

    embedded in HTML or used as a standalone binary (although the former use is much more

    common). Proprietary products in this niche are Microsoft`s Active Server Pages,

    Macromedia`s ColdFusion, and Sun`s Java Server Pages[2].

    3.2 HISTORY OF PHP

    PHP development began in 1994 when the developer Rasmus Lerdorf wrote a series of

    Common Gateway Interface (CGI) Perl scripts, which he used to maintain his personal

    homepage. The tools performed tasks such as displaying his rsum and recording his web

    traffic[1] .He rewrote these scripts in C for performance reasons, extending 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. PHP/FI could be used to

    build simple, dynamic web applications. Lerdorf initially announced the release of PHP/FI as

    "Personal Home Page Tools (PHP Tools) version 1.0" publicly to accelerate bug location and

    improve the code, on the comp.infosystems.www.authoring.cgi Usenet discussion group on

    June 8, 1995. This release already had the basic functionality that PHP has today. This

    included Perl-like variables, form handling, and the ability to embed HTML. The syntax was

    similar to Perl but was more limited and simpler, although less consistent. A development

    team began to form and, after months of work and beta testing, officially released PHP/FI 2

    in November 1997.

    3.3 VERSIONS OF PHP[3]

    PHP1, PHP2

    These versions were primary versions of PHP which are now not at all used.

  • 7/30/2019 Training Report on pHp mysql

    6/23

    6

    PHP 3

    PHP 3.0 was the first version that closely resembles PHP as it exists today. Finding PHP/FI

    2.0 still inefficient and lacking features they needed to power an eCommerce application they

    were developing for a university project, Andi Gutmans and Zeev Suraski of Tel Aviv, Israel,

    began yet another complete rewrite of the underlying parser in 1997. Approaching Rasmus

    online, they discussed various aspects of the current implementation and their redevelopment

    of PHP. In an effort to improve the engine and start building upon PHP/FI's existing user

    base, Andi, Rasmus, and Zeev decided to collaborate in the development of a new,

    independent programming language. This entirely new language was released under a new

    name, that removed the implication of limited personal use that the PHP/FI 2.0 name held. It

    was renamed simply 'PHP', with the meaning becoming a recursive acronym - PHP:

    Hypertext Preprocessor.

    One of the biggest strengths of PHP 3.0 was its strong extensibility features. In addition to

    providing end users with a mature interface for multiple databases, protocols, and APIs, the

    ease of extending the language itself attracted dozens of developers who submitted a variety

    of modules. Arguably, this was the key to PHP 3.0's tremendous success. Other key features

    introduced in PHP 3.0 included object-oriented programming support and a far more

    powerful and consistent language syntax.

    In June, 1998, with many new developers from around the world joining the effort, PHP 3.0

    was announced by the new PHP Development Team as the official successor to PHP/FI 2.0.

    Active development of PHP/FI 2.0, which had all-but ceased as of November of the previous

    year, was now officially ended. After roughly nine months of open public testing, when the

    announcement of the official release of PHP 3.0 came, it was already installed on over 70,000

    domains around the world, and was no longer limited to POSIX-compliant operating systems.A relatively small share of the domains reporting PHP as installed were hosted on servers

    running Windows 95, 98, and NT, and Macintosh. At its peak, PHP 3.0 was installed on

    approximately 10% of the web servers on the Internet.

    PHP 4

    By the winter of 1998, shortly after PHP 3.0 was officially released, Andi Gutmans and Zeev

    Suraski had begun working on a rewrite of PHP's core. The design goals were to improve

    performance of complex applications, and improve the modularity of PHP's code base. Such

  • 7/30/2019 Training Report on pHp mysql

    7/23

    7

    applications were made possible by PHP 3.0's new features and support for a wide variety of

    third party databases and APIs, but PHP 3.0 was not designed to handle such complex

    applications efficiently.

    The new engine, dubbed 'Zend Engine' (comprised of their first names, Zeev and Andi), met

    these design goals successfully, and was first introduced in mid 1999. PHP 4.0, based on this

    engine, and coupled with a wide range of additional new features, was officially released in

    May 2000, almost two years after its predecessor. In addition to the highly improved

    performance of this version, PHP 4.0 included other key features such as support for many

    more web servers, HTTP sessions, output buffering, more secure ways of handling user input

    and several new language constructs.

    PHP 5

    PHP 5 was released in July 2004 after long development and several pre-releases. It is mainly

    driven by its core, the Zend Engine 2.0 with a new object model and dozens of other new

    features.

    PHP's development team includes dozens of developers, as well as dozens others working on

    PHP-related and supporting projects, such as PEAR, PECL, and documentation, and an

    underlying network infrastructure of well over one-hundred individual web servers on six of

    the seven continents of the world. Though only an estimate based upon statistics from

    previous years, it is safe to presume PHP is now installed on tens or even perhaps hundreds of

    millions of domains around the world.

    3.5 FEATURES OF PHP[4]

    SERVER SIDE SCRIPTING

    PHP was originally designed to create dynamic web content, and it is still best suited for that

    task. To generate HTML, you need the PHP parser and a web server to send the documents.

    Lately, PHP has also become popular for generating XML documents, graphics, Flash

    animations, PDF files, and more.

  • 7/30/2019 Training Report on pHp mysql

    8/23

    8

    COMMAND LINE SCRIPTING

    PHP can run scripts from the command line, much like Perl, awk, or the Unix shell. You

    might use the command-line scripts for system administration tasks, such as backup and log

    parsing.

    CLIENT SIDE GUI APPLICATIONS

    Using PHP-GTK (http://gtk.php.net), you can write full-blown, cross-platform GUI

    applications in PHP.

    OPERATING SYSTEM SUPPORT

    PHP runs on all major operating systems, from Unix variants including Linux, FreeBSD, and

    Solaris to such diverse platforms as Windows and Mac OS X. It can be used with all leading

    web servers, including Apache, Microsoft IIS, and the Netscape/iPlanet servers.

    DATABASE SUPPORT

    One of PHP's most significant features is its wide-ranging support for databases. PHPsupports all major databases (including MySQL, PostgreSQL, Oracle, Sybase, and ODBC-

    compliant databases), and even many obscure ones. With PHP, creating web pages with

    dynamic content from a database is remarkably simple.

    Finally, PHP provides a library of PHP code to perform common tasks, such as database

    abstraction, error handling, and so on, with the PHP Extension and Application Repository

    (PEAR). PEAR is a framework and distribution system for reusable PHP components.[5]

  • 7/30/2019 Training Report on pHp mysql

    9/23

    9

    Chapter 4 PROJECT DESCRIPTION

    4.1 HARDWARE REQUIRED

    ProcessorIntel Pentium 4 or greater(2.4 Ghz

    processing speed)

    Hard disk size8 GB or greater

    RAM256 MB or greater

    Clock FrequencyMinimum of 2.8 Hz

    4.2 SOFTWARE REQUIRED

    Operating System Windows XP or greater

    Front End PHP v3 or greater

    Back End My Sql

    Server XAMPP 1.7.2 or greater

    XAMPP 1.7.4

    XAMPP is a free and open source cross-platform web server solution stack package,

    consisting mainly of the Apache HTTP Server, MySQL database, and interpreters for scripts

    written in the PHP and Perl programming languages. XAMPP is regularly updated to

    incorporate the latest releases of Apache/MySQL/PHP and Perl. It also comes with a number

    of other modules including OpenSSL and phpMyAdmin.

    Self-contained, multiple instances of XAMPP can exist on a single computer, and any given

    instance can be copied from one computer to another.It is offered in both a full, standard

    version and a smaller version.

    Officially, XAMPP's designers intended it for use only as a development tool, to allow

    website designers and programmers to test their work on their own computers without anyaccess to the Internet. To make this as easy as possible, many important security features are

  • 7/30/2019 Training Report on pHp mysql

    10/23

    10

    disabled by default. In practice, however, XAMPP is sometimes used to actually serve web

    pages on the World Wide Web. A special tool is provided to password-protect the most

    important parts of the package.

    XAMPP also provides support for creating and manipulating databases in MySQL and

    SQLite among others.

    Once XAMPP is installed, it is possible to treat a localhost like a remote host by connecting

    using an FTP client. Using a program like FileZilla has many advantages when installing a

    content management system (CMS) like Joomla. It is also possible to connect to localhost via

    FTP with an HTML editor.

    The default FTP user is "newuser", the default FTP password is "wampp".

    The default MySQL user is "root" while there is no default MySQL password.

    Components of XAMPP are

    Apache HTTPD 2.4.4 MySQL 5.5.27 PHP 5.4.7 Perl FileZilla FTP Server 0.9.41 phpMyAdmin 3.5.8 SQLite Mercury Mail Transport System XAMPP Control Panel 3.1.0

    MACROMEDIA DREAMWEAVER 8

    It allows to develop professional websites and its user-friendly interface, tools and features

    have made it the must-have package for web designers.

    Dreamweaver uses both Cascading Style Sheets (CSS) and Hyper Text MarkupLanguage (HTML) and it has good code-editing support features that will help to

    write the CSS and HTML.

    Alongside writing the code, one can use the visual layout tools to build sites and makethem look exceptional.

  • 7/30/2019 Training Report on pHp mysql

    11/23

    11

    One can use plug-ins to place videos, music and other media into web pages. To easily update a site, one can embed a live stream of content by using RSS. Provides a visual WYSIWYG editor (colloquially referred to as the Design view)

    Provides a code editor with standard features such as syntax highlighting, codecompletion, and code collapsing as well as more sophisticated features such as real-

    time syntax checking and code introspection for generating code hints to assist the

    user in writing code.

    Dreamweaver supports syntax highlighting for the following languages out of the box:

    ActionScript Extensible Markup Language (XML) Extensible Stylesheet Language Transformations (XSLT) HyperText Markup Language (HTML) Java JavaScript PHP: Hypertext Preprocessor (PHP) Visual Basic (VB)

    Visual Basic Script Edition (VBScript) Wireless Markup Language (WML)

    4.3 SOFTWARE INTERFACE

    XAMPP

    The following snapshot is of Xampp control panel.

  • 7/30/2019 Training Report on pHp mysql

    12/23

    12

    Figure 1: Xampp Control Panel

    From we can start the services Apache and Mysql just by clicking on the start button. This is

    the first thing we do in order to create a website. Here svc module is marked, if this module is

    marked then there is no need to start the services every time we turned on the computer.

    Since we only use Apache and Mysql services, so there is no need to start other services.

    DREAMWEAVER 8

    Following snapshots shows the steps of website development initializtions.

  • 7/30/2019 Training Report on pHp mysql

    13/23

    13

    Figure 2: Home Page of Dreamweaver

    From File menu-> New Site is selected

    Figure 3: Site Components

  • 7/30/2019 Training Report on pHp mysql

    14/23

    14

    Htdocs is the location where the webpages are to be kept and the http address given in the

    previous figure is provided at this step that is Local Information is provided in this step.

    Figure 4 : Selecting Access mode

    In the above figure remote information is provided like which server can access the files

    whether local server/network server or a FTP server.

  • 7/30/2019 Training Report on pHp mysql

    15/23

    15

    Figure 5 : Selecting Server Model

    In the above figure testing model is selected and the access is taken from the previous step

    that is Remote Info step. URL prefix should be given with care as it sometimes contain the

    Port number as shown in the above figure http://localhost:90/project.

  • 7/30/2019 Training Report on pHp mysql

    16/23

    16

    Figure 6 : Selecting the category of webpages

    Websites can be Static (Basic) or Dynamic. Above figure shows the selection category and

    language of implementation.

    PHPMYADMIN

    PhpMyadmin is the database store where all the databases, their respective tables are stored.In addition it can be even used to run SQL queries related to a web page whose database is

    stored in PhpMyadmin.

    Following is the figure showing the related database alongwith its tables.

  • 7/30/2019 Training Report on pHp mysql

    17/23

    17

    Figure 7 : MySQL database in phpMyAdmin

    We can view these tables through xampp installation on localhost and then in phpmyadmin.

    The url is generally as //localhost/phpmyadmin/ and in this case it is

    //localhost:90/phpmyadmin.

    4.4 USE CASE

    4.5 PROJECT DESCRIPTION WITH SNAPSHOTS

    The name of project is project. It is a dynamic website with a User view, where any user

    can visit and browse the pages. Another view is the Admin view, where the admin of the

    website (may be Owner of organization), whose do not possesses any technical knowledge

    about webpages may change the user view by adding new tabs, changing the content of

    pages. Following figures shows the index page of User view and Admin view

  • 7/30/2019 Training Report on pHp mysql

    18/23

    18

    Figure 8: User index page

    Figure 9: Admin index page

  • 7/30/2019 Training Report on pHp mysql

    19/23

    19

    Generally, a website is known by its User index page which here is localhost:90/project

    The admin index page is localhost:90/project/admin123

    ADMIN VIEW DESCRIPTION

    The admin needs to login the index page i.e. localhost:90/project/admin123 where admin

    provides the user name and the password. The username and the password is stored in the db

    where the password is also encrypted by md5 algorithm shown in figure below

    Figure 10 :Admin Credentials

    The admin is allowed 3 chances to authenticate, after which the site is locked [5]. For each

    three chances the admin is shown a message Wrong Username or Password.

    After login admin enters his/her panel where he/she can perform operations like changing his

    credentials, manage pages, provide contents, view contact forms.

  • 7/30/2019 Training Report on pHp mysql

    20/23

    20

    Figure 11 :Admin page after login

    Admin panel is provided with tabs listed below

    Main Control

    Visit Site Add New Page

    Visit site leads admin to open user view in new tab without logging admin out.

    Add new page is for making a new tab in the index page of user view and a new page indeed.

    Manage Content

    Show All PagesProvides a list view of all the pages

    Settings

    Change Credentials View Contact Forms

    Change Credentials leads user to a page where he/she can change Login Username, Name,

    Password.

  • 7/30/2019 Training Report on pHp mysql

    21/23

    21

    View Contact Form leads admin to a page where a list view is shown for all the queries send

    from the user view.

    Below are the screenshots of all the tabs

    Figure 12 :Add new page

    This page is provided with Add title and a web word editor CKEditor. Title becomes the Tab

    for the user view and the content provided in the editor becomes the content for the page.

    Figure 13 : CKEditor for providing Page Content

  • 7/30/2019 Training Report on pHp mysql

    22/23

    22

    Figure 14: Admin Credentials Page

    Above figure shows page where Admin can change user name, admin name, password.

    This page is auto filled from the backend i.e db but if admin empties the field and by-chance

    then alert is shown regarding the empty field and the field is focussed.

    Figure 15: View Contact Form

    The above figure opens when the admin selects View Contact Forms. Thispage provides the

    list view of all the queries messaged by the User from the User View.[5]

  • 7/30/2019 Training Report on pHp mysql

    23/23

    There are options to delete and view on this page. Selecting delete will delete the entries and

    selecting view will open new page showing all the details of the contact form.

    This page is automatically populated.

    USER VIEW DESCRIPTION

    The index page is the home page as shown in Figure 8

    The various tabs of user view are shown below