SlideShare ist ein Scribd-Unternehmen logo
1 von 41
HI-TECH INSTITUTE OF
ENGINEERING AND TECHNOLOGY
PRESENTATION ON
“WEB PROGAMMING USING PHP & MySQL”
DEPARTMENT OF IT
S U B M I T T E D B Y:
N A M E - S U M I T K U M A R
B I S W A S
C O U R S E - B - T E C H
B R A N C H - I T
S E M - 7 T H
Y E A R - 4 T H
R O L L N O . - 1 1 2 2 0 1 3 0 2 3
CONTENT
• History of PHP
• Introduction
• What is MySQL?
• What Does PHP Code Look like?
• Comments in PHP
• Variables in PHP
• How to Show Output in PHP
• PHP Operators
• PHP Forms and User Inputs
• HTML
• CSS
• Java Script
• PHP Database: MySQL
• Connecting PHP to MySQL
• About the Project
• How To Access An Website
Page
• Reasons for Choosing PHP
• PHP Drawbacks
• CONCLUSION
History of PHP
• PHP began in 1995 when Rasmus Lerdorf developed
a Perl/CGI script toolset he called the Personal Home
Page or PHP
• PHP 2 released 1997 (PHP now stands for Hypertext
Processor).
• PHP3 released in 1998 (50,000 users)
• PHP4 released in 2000 (3.6 million domains).
PHP5.0.0 released July 13, 2004 (113 libraries>1,000
functions with extensive object-oriented
programming)
• PHP5.0.5 released Sept. 6, 2005 for maintenance and
bug fixes
INTRODUCTION
What is PHP?
• PHP stands for PHP: Hypertext Preprocessor
• PHP is a server-side scripting language like ASP
• PHP scripts are executed on the server
• PHP supports many databases (MySQL, Informix,
Oracle, Sybase, Solid, PostgreSQL, Generic ODBC,
etc.)
• PHP is an open source software
• PHP is free to download and use
INTRODUCTION
What is PHP File?
• PHP files can contain text, HTML tags and scripts.
• PHP files are returned to the browser as plain HTML.
• PHP files have a file extension of ".php", ".php3", or
".phtml“.
Where to Start?
• To get access to a web server with PHP support, you
can:
• Install Apache, Wamp,Xamp on your own server,
install PHP, and MySQL
What is MySQL ?
• MySQL is a database server
• MySQL is ideal for both small and large applications
• MySQL supports standard SQL
• MySQL compiles on a number of platforms
• MySQL is free to download and use
WHAT DOES PHP CODE LOOK LIKE?
• Structurally similar to C/C++
• Supports procedural and object-oriented paradigm
(to some degree)
• All PHP statements end with a semi-colon
• Each PHP script must be enclosed in the reserved
PHP tag
<?php
…
?>
Comments in PHP
In PHP, we use // to make a single-line comment or /*
and */ to make a large comment block.
VARIABLES IN PHP
• Variables are used for storing a values, like text
strings, numbers or arrays.
• When a variable is set it can be used over and over
again in your script All variables in PHP start with a $
sign symbol.
HOW TO SHOW OUTPUT IN PHP ?
• The PHP command ‘echo’ is used to output the
parameters passed to it
• Syntax :
<?php
$txt=“Hello World”;
echo $txt;
?>
OUTPUT:
Hello World
PHP OPERATORS
• Arithmetic
PHP OPERATORS
• Assignment
PHP OPERATORS
• Comparison
PHP OPERATORS
• Logical
PHP FORMS AND USER
INPUT
• The PHP $_GET and $_POST variables are used to retrieve information
from forms, like user input.
• The $_GET variable is used to collect values from a form with
method="get".
• EXAMPLE:
<form action="welcome.php" method=“get">
• The $_POST variable is used to collect values from a form with
method="post".
• EXAMPLE:
<form action="welcome.php" method="post">
HTML
• HTML stands for Hypertext Markup Language, which is the
main programming structure for web pages and browser
software.
• When browser software accesses an HTML file it
understands how to parse the document according to the
file's extension.(.html - .txt - .php - .xml - .pdf - .doc - etc... ).
• HTML provides us a means of laying out and structuring our
web pages using paragraphs, images, lists, indents, boxes,
tables, colors, padding, and many more data structuring
methods common to most data processing systems.
Basic HTML Tags
The Main Elements of an HTML Document
<html> : Defines the beginning and end of an HTML document. It contains the
<head>, <title>, and <body>
<head> : Used to describe or modify the content in the document. The head
element contains the <meta>, and <title> elements
<title> : Displays a page title in the browser tab bars and bookmark lists. The title
element should come directly after your <meta> tags in the document and also
communicates to search engine indexing bots to some degree.
<body> : Directly after the <head> element closes(</head>) we define our
<body> element. This element contains everything that we want to display to the
browser software. The body element can have attributes set in it to affect the
entire document if the author so chooses.
Cascaded Style Sheet(CSS)
CSS is used to separate presentation and style from document
markup content.
CSS stands for Cascading Style Sheets
Styles define how to display HTML elements
Styles were added to HTML 4.0 to solve a problem
External Style Sheets can save a lot of work
External Style Sheets are stored in CSS files
JavaScript
JavaScript (not to be confused with Java) is a scripting
language that is widely used by many developers that focus
on website and web applications creation.
What is JavaScript?
JavaScript was designed to add interactivity to HTML pages
JavaScript is a scripting language
A scripting language is a lightweight programming language
JavaScript is usually embedded directly into HTML pages
JavaScript is an interpreted language (means that scripts
execute without preliminary compilation)
Everyone can use JavaScript without purchasing a license
PHP Database: MySQL
• MySQL is the most popular open-source database system.
• MySQL is a relational database management system (RDBMS) that runs as a
server providing multi-user access to number of databases.
• MySQL is currently the world’s most popular and widely used open source
database technology and data storage system. MySQL offers great reliability
and ease of use. It is free, and comes with free documentation as well as
thousands of programmers that share their code that relates to
communicating with a MySQL database. 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.
Connecting PHP to MySQL
• Before we can access data in a database, we must
open a connection to the MySQL server.
• In PHP, this is done with the mysql_connect()
function.
• Syntax :
• mysql_connect(host,username,password,dbname);
Parameter Description
host Optional. Either a host name or an IP address
username Optional. The MySQL user name
password Optional. The password to log in with
dbname Optional. The default database to be used when performing queries
Other MySQL Commands
• Mysql_close() : used to close an opened connection to
database
• Mysql_query() : sends the sql query through the
specified connection string to database returns the
result
• Mysql__fetch_array() : fetches result in an array from
the returned value from the query
• Mysql_error() : returns current mysql error description
Other MySQL Commands
• mysql_connect("localhost", "mysql_user", "mysql_password") or
die("Could not connect: " . mysql_error());
mysql_select_db("mydb");
$result = mysql_query("SELECT id, name FROM mytable");
while ($row = mysql_fetch_array($result)) {
printf("ID: %s Name: %s", $row[0], $row[1]);
}
mysql_free_result($result);
mysql_close();
How it Work MySQL
ABOUT THE PROJECT
• In this project , we have created the website of our
college “ HIET WEBSITE”.
• We have created several pages in our website:
• Home Page
• About Us
• Login Page
• T & P Activities & News
• Faculty Profile
• Events Page
HOME PAGE
• Home page is the main page of website.
• Whenever any user tries to look into the
website , this page opens.
ABOUT US PAGE
• In this page of website , al the details of our
college are provided such as when the college
was established .
LOGIN PAGE
• We have 2 types of logins for our website :
• Teacher Login where teacher can login to put certain
details of students like their marks .
• Student Login where student can login to look for
information like examination details.
FACULTY PROFILE PAGE
• In this page , we have provided all the details
of faculties of all departments.
EVENTS PAGE
• In this page , we have provided all the details
of all the events like Crossroads etc.
31
How To Access An Website Page
Click To Proceed
With The Steps
FaaDoOEngineers.com
32
Double Click on
the
Internet
Explorer
button
FaaDoOEngineers.com
33
Browser
Window
Opens
FaaDoOEngineers.com
34
Type the url
address &
Press Enter
Key
http://www.hiet.org.in
FaaDoOEngineers.com
HTML files
Web Server
Internet
Request
Request
User makes a request
www.hiet.org.in
http://www.hiet.org.in
FaaDoOEngineers.com
HTML files
Web Server
Internet
Web Page
Web Page
HIET page is returned from the Web Server
Reasons for Choosing PHP
1. Easy to get started
2. Designed for the web
3. Free to use
4. Many successful websites run on PHP
PHP Drawbacks
• PHP is a scripting language so it is slow (compared to C or
C++)
• PHP is a scripting language with dynamic typing so it may
have more undiscovered errors at run-time than a staticly
typed language such as Java, C++ or C#
• PHP is an ugly/messy/uncool procedural language
CONCLUSION
• It is easier to create websites in php as compared to
other technologies.
• We have created the website in php as php is easy to
learn and runs efficiently on the server side.
• Secondly , php is free to use and it is compatible with
almost all the servers used today.
Php reports sumit

Weitere ähnliche Inhalte

Ähnlich wie Php reports sumit

Web programming
Web programmingWeb programming
Web programmingIshucs
 
Choice of programming language for web developing.
Choice of programming language for web developing.Choice of programming language for web developing.
Choice of programming language for web developing.Mohammad Kamrul Hasan
 
Introduction to webprogramming using PHP and MySQL
Introduction to webprogramming using PHP and MySQLIntroduction to webprogramming using PHP and MySQL
Introduction to webprogramming using PHP and MySQLanand raj
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_phpJeanho Chu
 
PHP language presentation
PHP language presentationPHP language presentation
PHP language presentationAnnujj Agrawaal
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
06.m3 cms set-upwebserver
06.m3 cms set-upwebserver06.m3 cms set-upwebserver
06.m3 cms set-upwebservertarensi
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP TutorialLorna Mitchell
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_phpJeanho Chu
 
Module-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPModule-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPSIVAKUMAR V
 

Ähnlich wie Php reports sumit (20)

Web programming
Web programmingWeb programming
Web programming
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
Php intro
Php introPhp intro
Php intro
 
&lt;?php + WordPress
&lt;?php + WordPress&lt;?php + WordPress
&lt;?php + WordPress
 
Choice of programming language for web developing.
Choice of programming language for web developing.Choice of programming language for web developing.
Choice of programming language for web developing.
 
PHP MySQL Workshop - facehook
PHP MySQL Workshop - facehookPHP MySQL Workshop - facehook
PHP MySQL Workshop - facehook
 
Introduction to webprogramming using PHP and MySQL
Introduction to webprogramming using PHP and MySQLIntroduction to webprogramming using PHP and MySQL
Introduction to webprogramming using PHP and MySQL
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
PHP language presentation
PHP language presentationPHP language presentation
PHP language presentation
 
Intro apache
Intro apacheIntro apache
Intro apache
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
06.m3 cms set-upwebserver
06.m3 cms set-upwebserver06.m3 cms set-upwebserver
06.m3 cms set-upwebserver
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
Module-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPModule-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHP
 

Kürzlich hochgeladen

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 

Kürzlich hochgeladen (20)

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 

Php reports sumit

  • 1. HI-TECH INSTITUTE OF ENGINEERING AND TECHNOLOGY PRESENTATION ON “WEB PROGAMMING USING PHP & MySQL” DEPARTMENT OF IT S U B M I T T E D B Y: N A M E - S U M I T K U M A R B I S W A S C O U R S E - B - T E C H B R A N C H - I T S E M - 7 T H Y E A R - 4 T H R O L L N O . - 1 1 2 2 0 1 3 0 2 3
  • 2. CONTENT • History of PHP • Introduction • What is MySQL? • What Does PHP Code Look like? • Comments in PHP • Variables in PHP • How to Show Output in PHP • PHP Operators • PHP Forms and User Inputs • HTML • CSS • Java Script • PHP Database: MySQL • Connecting PHP to MySQL • About the Project • How To Access An Website Page • Reasons for Choosing PHP • PHP Drawbacks • CONCLUSION
  • 3. History of PHP • PHP began in 1995 when Rasmus Lerdorf developed a Perl/CGI script toolset he called the Personal Home Page or PHP • PHP 2 released 1997 (PHP now stands for Hypertext Processor). • PHP3 released in 1998 (50,000 users) • PHP4 released in 2000 (3.6 million domains). PHP5.0.0 released July 13, 2004 (113 libraries>1,000 functions with extensive object-oriented programming) • PHP5.0.5 released Sept. 6, 2005 for maintenance and bug fixes
  • 4. INTRODUCTION What is PHP? • PHP stands for PHP: Hypertext Preprocessor • PHP is a server-side scripting language like ASP • PHP scripts are executed on the server • PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.) • PHP is an open source software • PHP is free to download and use
  • 5. INTRODUCTION What is PHP File? • PHP files can contain text, HTML tags and scripts. • PHP files are returned to the browser as plain HTML. • PHP files have a file extension of ".php", ".php3", or ".phtml“. Where to Start? • To get access to a web server with PHP support, you can: • Install Apache, Wamp,Xamp on your own server, install PHP, and MySQL
  • 6. What is MySQL ? • MySQL is a database server • MySQL is ideal for both small and large applications • MySQL supports standard SQL • MySQL compiles on a number of platforms • MySQL is free to download and use
  • 7. WHAT DOES PHP CODE LOOK LIKE? • Structurally similar to C/C++ • Supports procedural and object-oriented paradigm (to some degree) • All PHP statements end with a semi-colon • Each PHP script must be enclosed in the reserved PHP tag <?php … ?>
  • 8. Comments in PHP In PHP, we use // to make a single-line comment or /* and */ to make a large comment block.
  • 9. VARIABLES IN PHP • Variables are used for storing a values, like text strings, numbers or arrays. • When a variable is set it can be used over and over again in your script All variables in PHP start with a $ sign symbol.
  • 10. HOW TO SHOW OUTPUT IN PHP ? • The PHP command ‘echo’ is used to output the parameters passed to it • Syntax : <?php $txt=“Hello World”; echo $txt; ?> OUTPUT: Hello World
  • 15. PHP FORMS AND USER INPUT • The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input. • The $_GET variable is used to collect values from a form with method="get". • EXAMPLE: <form action="welcome.php" method=“get"> • The $_POST variable is used to collect values from a form with method="post". • EXAMPLE: <form action="welcome.php" method="post">
  • 16. HTML • HTML stands for Hypertext Markup Language, which is the main programming structure for web pages and browser software. • When browser software accesses an HTML file it understands how to parse the document according to the file's extension.(.html - .txt - .php - .xml - .pdf - .doc - etc... ). • HTML provides us a means of laying out and structuring our web pages using paragraphs, images, lists, indents, boxes, tables, colors, padding, and many more data structuring methods common to most data processing systems.
  • 17. Basic HTML Tags The Main Elements of an HTML Document <html> : Defines the beginning and end of an HTML document. It contains the <head>, <title>, and <body> <head> : Used to describe or modify the content in the document. The head element contains the <meta>, and <title> elements <title> : Displays a page title in the browser tab bars and bookmark lists. The title element should come directly after your <meta> tags in the document and also communicates to search engine indexing bots to some degree. <body> : Directly after the <head> element closes(</head>) we define our <body> element. This element contains everything that we want to display to the browser software. The body element can have attributes set in it to affect the entire document if the author so chooses.
  • 18. Cascaded Style Sheet(CSS) CSS is used to separate presentation and style from document markup content. CSS stands for Cascading Style Sheets Styles define how to display HTML elements Styles were added to HTML 4.0 to solve a problem External Style Sheets can save a lot of work External Style Sheets are stored in CSS files
  • 19. JavaScript JavaScript (not to be confused with Java) is a scripting language that is widely used by many developers that focus on website and web applications creation. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded directly into HTML pages JavaScript is an interpreted language (means that scripts execute without preliminary compilation) Everyone can use JavaScript without purchasing a license
  • 20. PHP Database: MySQL • MySQL is the most popular open-source database system. • MySQL is a relational database management system (RDBMS) that runs as a server providing multi-user access to number of databases. • MySQL is currently the world’s most popular and widely used open source database technology and data storage system. MySQL offers great reliability and ease of use. It is free, and comes with free documentation as well as thousands of programmers that share their code that relates to communicating with a MySQL database. 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.
  • 21. Connecting PHP to MySQL • Before we can access data in a database, we must open a connection to the MySQL server. • In PHP, this is done with the mysql_connect() function. • Syntax : • mysql_connect(host,username,password,dbname); Parameter Description host Optional. Either a host name or an IP address username Optional. The MySQL user name password Optional. The password to log in with dbname Optional. The default database to be used when performing queries
  • 22. Other MySQL Commands • Mysql_close() : used to close an opened connection to database • Mysql_query() : sends the sql query through the specified connection string to database returns the result • Mysql__fetch_array() : fetches result in an array from the returned value from the query • Mysql_error() : returns current mysql error description
  • 23. Other MySQL Commands • mysql_connect("localhost", "mysql_user", "mysql_password") or die("Could not connect: " . mysql_error()); mysql_select_db("mydb"); $result = mysql_query("SELECT id, name FROM mytable"); while ($row = mysql_fetch_array($result)) { printf("ID: %s Name: %s", $row[0], $row[1]); } mysql_free_result($result); mysql_close();
  • 24. How it Work MySQL
  • 25. ABOUT THE PROJECT • In this project , we have created the website of our college “ HIET WEBSITE”. • We have created several pages in our website: • Home Page • About Us • Login Page • T & P Activities & News • Faculty Profile • Events Page
  • 26. HOME PAGE • Home page is the main page of website. • Whenever any user tries to look into the website , this page opens.
  • 27. ABOUT US PAGE • In this page of website , al the details of our college are provided such as when the college was established .
  • 28. LOGIN PAGE • We have 2 types of logins for our website : • Teacher Login where teacher can login to put certain details of students like their marks . • Student Login where student can login to look for information like examination details.
  • 29. FACULTY PROFILE PAGE • In this page , we have provided all the details of faculties of all departments.
  • 30. EVENTS PAGE • In this page , we have provided all the details of all the events like Crossroads etc.
  • 31. 31 How To Access An Website Page Click To Proceed With The Steps FaaDoOEngineers.com
  • 34. 34 Type the url address & Press Enter Key http://www.hiet.org.in FaaDoOEngineers.com
  • 35. HTML files Web Server Internet Request Request User makes a request www.hiet.org.in http://www.hiet.org.in FaaDoOEngineers.com
  • 36. HTML files Web Server Internet Web Page Web Page HIET page is returned from the Web Server
  • 37.
  • 38. Reasons for Choosing PHP 1. Easy to get started 2. Designed for the web 3. Free to use 4. Many successful websites run on PHP
  • 39. PHP Drawbacks • PHP is a scripting language so it is slow (compared to C or C++) • PHP is a scripting language with dynamic typing so it may have more undiscovered errors at run-time than a staticly typed language such as Java, C++ or C# • PHP is an ugly/messy/uncool procedural language
  • 40. CONCLUSION • It is easier to create websites in php as compared to other technologies. • We have created the website in php as php is easy to learn and runs efficiently on the server side. • Secondly , php is free to use and it is compatible with almost all the servers used today.