SlideShare a Scribd company logo
Welcome TO
FreeEasyTutorials.com
http://www.freeeasytutorials.com/
PHP Tutorials
What is PHP
> PHP which stands for Hypertext Preprocessor is a web server-
side scripting language designed for web development.
> It is a general purpose programming language that can be used
for multiple applications such as setting-up security for web
information and manipulation of data within database more
especially MySQL as we will see later in our tutorials and much
more.
> PHP helps in making work easy especially when using the
inbuilt functions and connecting to a database.
http://www.freeeasytutorials.com/
Features of PHP
> PHP is the most popular scripting language used for web
development.
> PHP is use to develop static as well as dynamic websites.
> Interesting thing about PHP is it is free , open source (no
need to buy license to create personal as well as commercial
applications) and server-side scripting language(the code is
always executed on the server and generated output is
returned to the end user)
> PHP is faster than other scripting language like ASP and JSP.
> PHP provides two options to write your code I.e. you can
write your HTML code and embed PHP code inside the HTML
code or you can have option to write HTML code inside PHP
code.We will see how to write them in upcoming tutorials.
http://www.freeeasytutorials.com/
Environment setup
> In order to create and run PHP programs on your pc
and before uploading them to hosts for worldwide
connection, you need a local server.
> A server will help to enhance communication
between scripts thus enabling your application run
smoothly.
> For this purpose you need a software like Xampp or
other options like Wampp but in this case we are going
to use Xampp.
http://www.freeeasytutorials.com/
XAMPP installation
As we already know In order to create and run PHP
programs on your pc and before uploading them to
hosts for worldwide connection, you need a local
server.
Follow the steps given below to install XAMPP on
your local computer.
Locate the downloaded programs i.e. XAMPP setup
file :
> The best directory to get you to your downloaded
program is downloads/programs and look for the
Xampp executable file. Double-click it or :
Running program as an administrator :
> Right click on the icon of the XAMPP program
(executable file) and select the option Run as
administrator from the drop down list. http://www.freeeasytutorials.com/
PHP - Database
> More often we would like to keep information about our users for later reference
with our website, we thus resolve to using databases.
> PHP helps in making work easy especially when using the inbuilt functions and
connecting to a database.
> With PHP, you can connect to database and perform the databases operations like
insert,delete,update and many more.
> MySQL is mainly use for simplicity in storing website data for example user-names
and passwords, it is better to have a database for reference.
> MySQL provides a better interface for which we can manipulate our data.
> Before doing anything with MySql database, ensure you start MySql module in the
Xampp control panel.
> Our next topics will take us through the process of connecting and manipulating
data in our database and the website.
http://www.freeeasytutorials.com/
PHP - MYSQL Connect
> This part is very important and must be included in every file
where we want to connect to database and retrieve or send data
to a database.
> The better version of doing it is to create a file with the
connection functionality and include or require in this other files.
> The function for creating the connection is;
mysql_connect(server_name, username, password) ;
> By default, the php admin provides that the username to be root
and password is null i.e ‘ ’.
> To start the PHP admin for database, click the admin button for
MySql module in the xampp control panel.
http://www.freeeasytutorials.com/
PHP - MYSQL Update
> Many at a times, users would like to
update their information in your website
such as the username, or email or the
reset a password
> We thus must therefore provide the
with this functionality to change these
things according to user needs.
> To enhance this, we use the UPDATE
query in PHP queries.
> we can specify which data we want to
update the data using the WHERE clause
> For example let’s change the name
Brianfrom previous example to John and
email example@gmail.com to
someone@gmail.com
http://www.freeeasytutorials.com/
PHP - MYSQL Select
> The SELECT query allows us to get information from the database.
> We use SELECT query to get all the information or specific
information from the database.
> To get all the information from database we use a *; i.e “SELECT *
FROM table_name”.
> To get information of a specific field we specify it in the query i.e let
us select information from the field username i.e “SELECT username
FROM table_name”.
> This module also allows the selection of data for a specific object
using the WHERE clause.
> Let’s for example write a simple program to display all id, username
and emails from our table
http://www.freeeasytutorials.com/
PHP - Sample Application
> We have now come to the end of our tutorials.
> Attached is a a sample application for a voting system in an institution.You
can also use this voting system to do online shopping.
Instruction on installing the online voting system
1.Download the folder Dekut here.
2.Save the folder in htdocs as we do always in xampp folder in c disk.
3.Start both apache an mysql in xampp control panel.
4.Click admin for the mysQl option in xamp control pannel.
http://www.freeeasytutorials.com/
About FreeEasyTutorials.com
FreeEasyTutorials.com (launched in 2017) is a website which has
been created to provide very simple and easy programming
tutorials and useful articles for beginners and professionals
across the globe.The website also contains articles to learn how
to earn online money.
Mission
New ideas, techniques and teachings are found every day. FreeEasyTutorials.com is
always changing / adding it's tutorials and references to provide latest tutorials to our
readers. We are working continuously to make FreeEasyTutorials.com more useful for
every single moment you spend on the website.
Best regards,
FreeEasyTutorials.com
http://www.freeeasytutorials.com/
For More Information Please
Visit Our Site
http://www.freeeasytutorials.com/
http://www.freeeasytutorials.com/

More Related Content

What's hot (20)

How to Install and Configure Drupal CMS
How to Install and Configure Drupal CMS
ffats1
 
Apache error
Apache error
Rishabh Bahukhandi
 
How to use_000webhost
How to use_000webhost
IIUM
 
Setting up a web server in Linux (Ubuntu)
Setting up a web server in Linux (Ubuntu)
Zakaria Hossain
 
Apache ppt
Apache ppt
poornima sugumaran
 
Installation of Joomla on Windows XP
Installation of Joomla on Windows XP
Rupesh Kumar
 
Installation of wordpress
Installation of wordpress
HAINIRMALRAJ
 
Apache ppt
Apache ppt
poornima sugumaran
 
Introduction to php
Introduction to php
shanmukhareddy dasi
 
Apache web service
Apache web service
Manash Kumar Mondal
 
Securing Your Web Server
Securing Your Web Server
manugoel2003
 
Configure use-tomcat
Configure use-tomcat
Jesus Diaz Gonzalez
 
MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher
akashdprajapati
 
Installation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHP
Rupesh Kumar
 
Apache Ppt
Apache Ppt
Hema Prasanth
 
Joomla
Joomla
sahil
 
Word press & dreamweaver
Word press & dreamweaver
kmawk
 
Setting up a debugging environment for Drupal
Setting up a debugging environment for Drupal
jonlee554
 
Apache server configuration & optimization
Apache server configuration & optimization
Gokul Muralidharan
 
WordPress: a stepping stone to Web Development
WordPress: a stepping stone to Web Development
remixwolf
 
How to Install and Configure Drupal CMS
How to Install and Configure Drupal CMS
ffats1
 
How to use_000webhost
How to use_000webhost
IIUM
 
Setting up a web server in Linux (Ubuntu)
Setting up a web server in Linux (Ubuntu)
Zakaria Hossain
 
Installation of Joomla on Windows XP
Installation of Joomla on Windows XP
Rupesh Kumar
 
Installation of wordpress
Installation of wordpress
HAINIRMALRAJ
 
Securing Your Web Server
Securing Your Web Server
manugoel2003
 
MuleSoft ESB Message Enricher
MuleSoft ESB Message Enricher
akashdprajapati
 
Installation of OpenBiblio on Windows XP using EasyPHP
Installation of OpenBiblio on Windows XP using EasyPHP
Rupesh Kumar
 
Joomla
Joomla
sahil
 
Word press & dreamweaver
Word press & dreamweaver
kmawk
 
Setting up a debugging environment for Drupal
Setting up a debugging environment for Drupal
jonlee554
 
Apache server configuration & optimization
Apache server configuration & optimization
Gokul Muralidharan
 
WordPress: a stepping stone to Web Development
WordPress: a stepping stone to Web Development
remixwolf
 

Similar to PHP tutorials , php tutorials for beginners , tutorials for php (20)

Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
Chetan Soni
 
Web hosting Free Hosting
Web hosting Free Hosting
Laurence Svekis ✔
 
Web hosting get start online
Web hosting get start online
Laurence Svekis ✔
 
Php hypertext Preprocessor
Php hypertext Preprocessor
MrsRLakshmiIT
 
A Complete Installation Guide for Orangescrum
A Complete Installation Guide for Orangescrum
Orangescrum
 
Its3 Drupal
Its3 Drupal
guest954945a
 
Its3 Drupal
Its3 Drupal
guest954945a
 
PHP
PHP
Gouthaman V
 
Mantis Installation for Windows Box
Mantis Installation for Windows Box
guest34a3a419
 
Mantis Installation for Windows Box
Mantis Installation for Windows Box
Jayanta Dash
 
How to Install a PHP Script in cPanel.pdf
How to Install a PHP Script in cPanel.pdf
Host It Smart
 
Chapter 08 php advance
Chapter 08 php advance
Dhani Ahmad
 
Apache - Quick reference guide
Apache - Quick reference guide
Joseph's WebSphere Library
 
Installing php and my sql locally using xampp
Installing php and my sql locally using xampp
peyman Ghader Kurehpaz
 
Diva23
Diva23
diva23
 
PHP-MySQL Database Connectivity Using XAMPP Server
PHP-MySQL Database Connectivity Using XAMPP Server
Rajiv Bhatia
 
Php
Php
TSUBHASHRI
 
Php
Php
TSUBHASHRI
 
Php
Php
TSUBHASHRI
 
Crime Reporting System.pptx
Crime Reporting System.pptx
PenilVora
 
Wamp & LAMP - Installation and Configuration
Wamp & LAMP - Installation and Configuration
Chetan Soni
 
Php hypertext Preprocessor
Php hypertext Preprocessor
MrsRLakshmiIT
 
A Complete Installation Guide for Orangescrum
A Complete Installation Guide for Orangescrum
Orangescrum
 
Mantis Installation for Windows Box
Mantis Installation for Windows Box
guest34a3a419
 
Mantis Installation for Windows Box
Mantis Installation for Windows Box
Jayanta Dash
 
How to Install a PHP Script in cPanel.pdf
How to Install a PHP Script in cPanel.pdf
Host It Smart
 
Chapter 08 php advance
Chapter 08 php advance
Dhani Ahmad
 
Installing php and my sql locally using xampp
Installing php and my sql locally using xampp
peyman Ghader Kurehpaz
 
Diva23
Diva23
diva23
 
PHP-MySQL Database Connectivity Using XAMPP Server
PHP-MySQL Database Connectivity Using XAMPP Server
Rajiv Bhatia
 
Crime Reporting System.pptx
Crime Reporting System.pptx
PenilVora
 
Ad

Recently uploaded (20)

Extending Infrastructure Life with Protective Coatings
Extending Infrastructure Life with Protective Coatings
rahil wit
 
Auditing Property Financials_ Best Practices.pptx
Auditing Property Financials_ Best Practices.pptx
exoedgemarketingteam
 
zlib.pub_fundamental-analysis-for-investors-4th-edition.pdf
zlib.pub_fundamental-analysis-for-investors-4th-edition.pdf
ssuserc74044
 
Chapter 7.ppt for marketing planning and research
Chapter 7.ppt for marketing planning and research
selvavishnuchelliah2
 
A Certificate Programme on ISO56000 Series_Ver 4_Level 1.pdf
A Certificate Programme on ISO56000 Series_Ver 4_Level 1.pdf
Innomantra
 
5 Most Powerful Reasons to Hire a Management Consultant – Boost Efficiency & ...
5 Most Powerful Reasons to Hire a Management Consultant – Boost Efficiency & ...
RUPAL AGARWAL
 
What is Interior designing(introduction).pdf
What is Interior designing(introduction).pdf
bhatiagitali
 
Oleksandr Osypenko: Комунікації у проєкті (UA)
Oleksandr Osypenko: Комунікації у проєкті (UA)
Lviv Startup Club
 
International Business, 4th Edition- Alan M. Rugman.pdf
International Business, 4th Edition- Alan M. Rugman.pdf
GamingwithUBAID
 
Stuart Frost - The Chief Executive Officer Of Geminos
Stuart Frost - The Chief Executive Officer Of Geminos
Stuart Frost
 
StatementOfResult.pdf........................
StatementOfResult.pdf........................
AnnasofiaUrsini
 
BMGI India Addressing Strategic, Innovative, and Operational Problems at Core...
BMGI India Addressing Strategic, Innovative, and Operational Problems at Core...
Naresh Raisinghani
 
🧪 JIS Z 8901 Class 8 Kanto Loam .pdf
🧪 JIS Z 8901 Class 8 Kanto Loam .pdf
Particle Powder
 
solulab.com-How to Build a Private LLM.pdf
solulab.com-How to Build a Private LLM.pdf
celinedion89121
 
Ch01.ppt bisnis internasional bisnis internasional
Ch01.ppt bisnis internasional bisnis internasional
devina81
 
ISO 45001 Certification in Singapore Company
ISO 45001 Certification in Singapore Company
achharsharma105
 
Kirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip
 
Breaking Through Cultural Friction: The Role of Respect for People (Strengthe...
Breaking Through Cultural Friction: The Role of Respect for People (Strengthe...
KaiNexus
 
PT IBX Daya Nusantara Company Profile 2025
PT IBX Daya Nusantara Company Profile 2025
IBX Daya Nusantara
 
Ch02.ppt bisnis internasional bisnis internasional
Ch02.ppt bisnis internasional bisnis internasional
devina81
 
Extending Infrastructure Life with Protective Coatings
Extending Infrastructure Life with Protective Coatings
rahil wit
 
Auditing Property Financials_ Best Practices.pptx
Auditing Property Financials_ Best Practices.pptx
exoedgemarketingteam
 
zlib.pub_fundamental-analysis-for-investors-4th-edition.pdf
zlib.pub_fundamental-analysis-for-investors-4th-edition.pdf
ssuserc74044
 
Chapter 7.ppt for marketing planning and research
Chapter 7.ppt for marketing planning and research
selvavishnuchelliah2
 
A Certificate Programme on ISO56000 Series_Ver 4_Level 1.pdf
A Certificate Programme on ISO56000 Series_Ver 4_Level 1.pdf
Innomantra
 
5 Most Powerful Reasons to Hire a Management Consultant – Boost Efficiency & ...
5 Most Powerful Reasons to Hire a Management Consultant – Boost Efficiency & ...
RUPAL AGARWAL
 
What is Interior designing(introduction).pdf
What is Interior designing(introduction).pdf
bhatiagitali
 
Oleksandr Osypenko: Комунікації у проєкті (UA)
Oleksandr Osypenko: Комунікації у проєкті (UA)
Lviv Startup Club
 
International Business, 4th Edition- Alan M. Rugman.pdf
International Business, 4th Edition- Alan M. Rugman.pdf
GamingwithUBAID
 
Stuart Frost - The Chief Executive Officer Of Geminos
Stuart Frost - The Chief Executive Officer Of Geminos
Stuart Frost
 
StatementOfResult.pdf........................
StatementOfResult.pdf........................
AnnasofiaUrsini
 
BMGI India Addressing Strategic, Innovative, and Operational Problems at Core...
BMGI India Addressing Strategic, Innovative, and Operational Problems at Core...
Naresh Raisinghani
 
🧪 JIS Z 8901 Class 8 Kanto Loam .pdf
🧪 JIS Z 8901 Class 8 Kanto Loam .pdf
Particle Powder
 
solulab.com-How to Build a Private LLM.pdf
solulab.com-How to Build a Private LLM.pdf
celinedion89121
 
Ch01.ppt bisnis internasional bisnis internasional
Ch01.ppt bisnis internasional bisnis internasional
devina81
 
ISO 45001 Certification in Singapore Company
ISO 45001 Certification in Singapore Company
achharsharma105
 
Kirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip GEM Royalty TNR Gold Copper Presentation
Kirill Klip
 
Breaking Through Cultural Friction: The Role of Respect for People (Strengthe...
Breaking Through Cultural Friction: The Role of Respect for People (Strengthe...
KaiNexus
 
PT IBX Daya Nusantara Company Profile 2025
PT IBX Daya Nusantara Company Profile 2025
IBX Daya Nusantara
 
Ch02.ppt bisnis internasional bisnis internasional
Ch02.ppt bisnis internasional bisnis internasional
devina81
 
Ad

PHP tutorials , php tutorials for beginners , tutorials for php

  • 2. PHP Tutorials What is PHP > PHP which stands for Hypertext Preprocessor is a web server- side scripting language designed for web development. > It is a general purpose programming language that can be used for multiple applications such as setting-up security for web information and manipulation of data within database more especially MySQL as we will see later in our tutorials and much more. > PHP helps in making work easy especially when using the inbuilt functions and connecting to a database. http://www.freeeasytutorials.com/
  • 3. Features of PHP > PHP is the most popular scripting language used for web development. > PHP is use to develop static as well as dynamic websites. > Interesting thing about PHP is it is free , open source (no need to buy license to create personal as well as commercial applications) and server-side scripting language(the code is always executed on the server and generated output is returned to the end user) > PHP is faster than other scripting language like ASP and JSP. > PHP provides two options to write your code I.e. you can write your HTML code and embed PHP code inside the HTML code or you can have option to write HTML code inside PHP code.We will see how to write them in upcoming tutorials. http://www.freeeasytutorials.com/
  • 4. Environment setup > In order to create and run PHP programs on your pc and before uploading them to hosts for worldwide connection, you need a local server. > A server will help to enhance communication between scripts thus enabling your application run smoothly. > For this purpose you need a software like Xampp or other options like Wampp but in this case we are going to use Xampp. http://www.freeeasytutorials.com/
  • 5. XAMPP installation As we already know In order to create and run PHP programs on your pc and before uploading them to hosts for worldwide connection, you need a local server. Follow the steps given below to install XAMPP on your local computer. Locate the downloaded programs i.e. XAMPP setup file : > The best directory to get you to your downloaded program is downloads/programs and look for the Xampp executable file. Double-click it or : Running program as an administrator : > Right click on the icon of the XAMPP program (executable file) and select the option Run as administrator from the drop down list. http://www.freeeasytutorials.com/
  • 6. PHP - Database > More often we would like to keep information about our users for later reference with our website, we thus resolve to using databases. > PHP helps in making work easy especially when using the inbuilt functions and connecting to a database. > With PHP, you can connect to database and perform the databases operations like insert,delete,update and many more. > MySQL is mainly use for simplicity in storing website data for example user-names and passwords, it is better to have a database for reference. > MySQL provides a better interface for which we can manipulate our data. > Before doing anything with MySql database, ensure you start MySql module in the Xampp control panel. > Our next topics will take us through the process of connecting and manipulating data in our database and the website. http://www.freeeasytutorials.com/
  • 7. PHP - MYSQL Connect > This part is very important and must be included in every file where we want to connect to database and retrieve or send data to a database. > The better version of doing it is to create a file with the connection functionality and include or require in this other files. > The function for creating the connection is; mysql_connect(server_name, username, password) ; > By default, the php admin provides that the username to be root and password is null i.e ‘ ’. > To start the PHP admin for database, click the admin button for MySql module in the xampp control panel. http://www.freeeasytutorials.com/
  • 8. PHP - MYSQL Update > Many at a times, users would like to update their information in your website such as the username, or email or the reset a password > We thus must therefore provide the with this functionality to change these things according to user needs. > To enhance this, we use the UPDATE query in PHP queries. > we can specify which data we want to update the data using the WHERE clause > For example let’s change the name Brianfrom previous example to John and email [email protected] to [email protected] http://www.freeeasytutorials.com/
  • 9. PHP - MYSQL Select > The SELECT query allows us to get information from the database. > We use SELECT query to get all the information or specific information from the database. > To get all the information from database we use a *; i.e “SELECT * FROM table_name”. > To get information of a specific field we specify it in the query i.e let us select information from the field username i.e “SELECT username FROM table_name”. > This module also allows the selection of data for a specific object using the WHERE clause. > Let’s for example write a simple program to display all id, username and emails from our table http://www.freeeasytutorials.com/
  • 10. PHP - Sample Application > We have now come to the end of our tutorials. > Attached is a a sample application for a voting system in an institution.You can also use this voting system to do online shopping. Instruction on installing the online voting system 1.Download the folder Dekut here. 2.Save the folder in htdocs as we do always in xampp folder in c disk. 3.Start both apache an mysql in xampp control panel. 4.Click admin for the mysQl option in xamp control pannel. http://www.freeeasytutorials.com/
  • 11. About FreeEasyTutorials.com FreeEasyTutorials.com (launched in 2017) is a website which has been created to provide very simple and easy programming tutorials and useful articles for beginners and professionals across the globe.The website also contains articles to learn how to earn online money. Mission New ideas, techniques and teachings are found every day. FreeEasyTutorials.com is always changing / adding it's tutorials and references to provide latest tutorials to our readers. We are working continuously to make FreeEasyTutorials.com more useful for every single moment you spend on the website. Best regards, FreeEasyTutorials.com http://www.freeeasytutorials.com/
  • 12. For More Information Please Visit Our Site http://www.freeeasytutorials.com/ http://www.freeeasytutorials.com/