You are on page 1of 4

Department of Computer Engineering Subject: Web Technology Laboratory

Expected Date of Completion…………………………………

Actual Date of Completion……………………….

Assignment No: 7
Title: Add dynamic web application essence using PHP, HTML and MySQL
Objective:

1. Understand the principle, methodology of PHP web application development process.


Problem Statement
Build a dynamic web application using PHP and MySQL.
a. Create database tables in MySQL and create connection with PHP.
b. Create the add, update, delete and retrieve functions in the PHP web app interacting with
MySQL database.

Outcomes

1. Develop a web-based application using suitable client side & server-side web technology.
2. Develop solution to complex problems using appropriate methods, technologies, frameworks,
web services and content management.

Software and Hardware requirement


Software:
1. Windows XP/ Ubuntu 64 Bit
2.XAMMPS Server
Hardware:
Intel P4 machine with 1GB RAM and 32GB HDD.

Theory

PHP: The PHP Hypertext Pre-processor (PHP) began as little open-source venture that advanced
as an ever-increasing number of individuals discovered how valuable it was. Rasmus Lerdorf
released the principal form of PHP route in 1994. PHP is recursive acronym for “PHP: Hypertext
Pre-processor”.
PHP is server-side scripting dialect that is installed in HTML. It is utilised to oversee dynamic
substance, databases, session following even form whole internet business locales. It is
incorporated with various prevalent databases including MySQL, PostgreSQL, Oracle, Sybase
Informix, and Microsoft SQL Server.

Example:
<html>

<head>
<title>PHP Example</title>
</head>

<body>
<?php echo "Hello, World! This is PHP code";?>
</body>

</html>

Output: Hello, World! This is PHP code

To create and Run PHP web pages Three fundamental parts should be introduced on your
PC Framework:

1. Webserver- Download Apache HTTP Server from https://httpd.apache.org/download.cgi.


2. Database- Download MySQL from https://dev.mysql.com/downloads/mysql/.
3. PHP Parser- PHP Parser is a library that takes a source code written in PHP, passes it
through a lexical analyser, and creates its respective syntax tree. This is very useful for static
code analysis, where we want to check our own code not only for syntactic errors but also
for satisfying certain quality criteria.

• DATABASE:
The database is an organized collection of structured data to make it easily accessible,
manageable and update. In simple words, you can say, a database in a place where the data is
stored. The best analogy is the library. The library contains a huge collection of books of
different genres, here the library is database and books are the data.

There are many different types of databases. The best database for a specific organization
depends on how the organization intends to use the data.
These days, Relational databases became dominant. Items in a relational database are organized
as a set of tables with columns and rows. Relational database technology provides the most
efficient and flexible way to access structured information.

MySQL:

MySQL is a relational database management system. It is open-source, free and ideal for both
small and large applications. MySQL is very fast, reliable, scalable, and easy to use cross-
platform database.
MySQL is compliant with the ANSI SQL standard and it was first released in 1995 by Oracle
Corporation. MySQL is named after co-founder Monty Widenius's daughter: My.

Tools and Techniques


• Technology is to be used is PHP & tool XAMPP server is to be used to execute PHP web
Application.

• XAMPP server embeds the PHP, MySQL & phpMyAdmin, these three tools must be required
to run PHP web application.

Design and Execution Steps


Steps to install XAMPP and configure the PHP and MySQL Server.
1. Download XAMPP using this link- https://www.apachefriends.org/download.html
2. Install XAMPP
3. Run .exe file
4. Start the setup wizard
5. Choose software components (eg, MySQl, PHP, phpMyAdmin)
6. Choose the installation directory
7. Start the installation process
8. Windows Firewall blocking
9. Complete the installation-After successful completion it will ask to run XAMPP here say
to run. After run MySQL and Apache server should be in running state.
10. Now open browser and type localhost in URL with Quotes.
11. Default directory with path will appear
12. If you have successfully installed and Start XAMPP now you can navigate htdocs by
typing respective commands.
13. To navigate root folder-cd/.
14. To navigate htdocs folder-cd/opt/lamp/htdocs.
15. To create a file hello.php-gedit hello.php.
16. Now go to your browser then type localhost/filename.php.
17. Open phpMyAdmin to create MySQL database.
Now you can create your database table inside the database as per your need.
Test Cases
Manual Testing is used to add, update, delete and retrieve functions in the PHP web app with the
MySQL database.

Conclusion
In This assignment we have studied how to design & develop small web application using PHP
Script, XAMPP server with Apache server & MySQL as backend.

You might also like