- Structuring code in OOPS paradigm
- Showing results in a pie chart.
$ sudo apt update && upgrade
$ sudo apt install apache2
$ sudo apt install php libapache2-mod-php php-mysql
PHP, MySQL and JavaScript
create database poll;
create table author_poll (id
int(11) NOT NULL AUTO_INCREMENT,choice
tinyint(4) NOT NULL DEFAULT '0',ts
timestamp NULL DEFAULT NULL,
PRIMARY KEY (id
));
• database.sql -> This file consist of MySQL Query to create Database and Table.
• db_fn.php -> This file is used to create the MySQL operation function to develop the OOPS paradigm.
• display.php -> This is used to display the Result in the Pie Chart Format.
• opinion.php -> This is used to Poll form.
$ sudo /etc/init.d/apache2 restart (Start the Apache2 server)
• Copy the Unzip Repositry to '/var/www/html/' location
• Open any Browser and type the address 'http://localhost/opinion.php'