SlideShare a Scribd company logo
1 of 37
Page 1
Page 2
Dominant Infotech
"Dominant InfoTech” provides a comprehensive
range of web and software development outsourcing services.
Listed below are the core areas that we provide our services
in:
 Web Development
 Web Design
 Mobile App. Development
 E-commerce Solution
 CMS Websites
 SEO
 Logo & Graphics Design
 Provide Training
Page 3
Technologies
Web Technologies
 PHP
 .NET
 JAVA(JSP)
 WORDPRESS
 MAGENTO
 JOOMLA
 OPENCART
 WOOCOMMERCE
 XSLT
 XML
 HTML/CSS
 AJAX
 J-Query
 JS (Node + Angular)
 Web Services
.NET Technologies
 XAML
 WPF
 WCF
 WWF
Mobile Technologies
 ANDROID
 I-PHONE
 I-PAD
Page 4
Différences Between PHP , Asp.net And JSP
Page 5
PHP :- Personal Home Page
What is PHP?
 "PHP: Hypertext Pre-processor“ .
 PHP is a widely-used, open source scripting language
 PHP scripts are executed on the server
What Can PHP Do?
 PHP can generate dynamic page content
 PHP can create, open, read, write, delete, and close files on
the server
 PHP can collect form data and can add, delete, modify data
in your database.
 PHP can send and receive cookies
 PHP can be used to control user-access and encrypt data.
Page 6
Server Are distinguish Based on Operating System You
Have :-
 WAMP
 MAMP
 XAMP
 LAMP
Web Server ???
Page 7
 The phpinfo() function shows the php environment
 Use this to read system and server variables, setting stored in
php.ini, versions, and modules
 Notice that many of these data are in arrays
 This is the first script you may write…
Phpinfo() :-
<BODY>
<P>
<?php $myvar = "Hello World!";
echo $myvar;
</BODY>
<?php
echo
"<html><head><title>Howdy
</title>
…?>
Page 8
PHP Conditional Statements
 if statement - use this statement to execute some code only
if a specified condition is true
 if...else statement - use this statement to execute some
code if a condition is true and another code if the condition is
false
 if...else if....else statement - use this statement to select
one of several blocks of code to be executed
 switch statement - use this statement to select one of many
blocks of code to be executed
Page 9
PHP Loops
 while - loops through a block of code while a specified
condition is true
 do...while - loops through a block of code once, and then
repeats the loop as long as a specified condition is true
 for - loops through a block of code a specified number of
times
 foreach - loops through a block of code for each element in
an array
Page 10
UDF Functions in PHP
Page 11
PHP Arrays
In PHP, there are three kind of arrays:
 Numeric array - An array with a numeric index
 Associative array - An array where each ID key is
associated with a value
 Multidimensional array - An array containing one or
more arrays
Page 12
PHP Numeric Arrays
 A numeric array stores each array element with a numeric
index.
 There are two methods to create a numeric array.
In the following example the index is automatically assigned
(the index starts at 0):
In the following example we assign the index manually:
Page 13
PHP Numeric Arrays
 In the following example you access the variable values by
referring to the array name and index:
 The code above will output:
Page 14
PHP Associative Arrays
 With an associative array, each ID key is associated with a
value.
 When storing data about specific named values, a
numerical array is not always the best way to do it.
 With associative arrays we can use the values as keys and
assign values to them.
Page 15
PHP Associative Arrays
Page 16
PHP Multidimensional Arrays
 In a multidimensional array, each element in the main array can
also be an array. And each element in the sub-array can be an
array, and so on.
Page 17
Include Files
 include “header.php”; and include (“footer.php”);
 This inserts files; the code in files will be inserted into
current code.
 require is identical to include except upon failure it will
also produce a fatal E_COMPILE_ERROR level error. In
other words, it will halt the script whereas include only
emits a warning (E_WARNING) which allows the script to
continue.
 The include_once statement includes and evaluates the
specified file during the execution of the script.
 This is a behavior similar to the include statement, with the
only difference being that if the code from a file has already
been included, it will not be included again.
 The require_once statement is identical to require except
PHP will check if the file has already been included.
Page 18
MySQL Connectivity Commands
 mysql_select_db()
o The mysql_select_db() function sets the active MySQL
database.
o This function returns TRUE on success, or FALSE on
failure.
Syntax:
o mysql_select_db(connection, database)
 mysql_query()
o The mysql_query() function executes a query on a
MySQL database.
o This function returns the query handle for SELECT
queries, TRUE/FALSE for other queries, or FALSE on
failure.
Page 19
MySQL Connectivity Commands
Syntax:-
o mysql_query(connection ,query)
 mysql_fetch_row()
o The mysql_fetch_row() function returns a row
from a recordset
Syntax:-
o mysql_fetch_row(data)
 Mysql_Connect()
o The mysql_connect() function is used to open a
connection to a MySQL server.
Syntax:-
o mysql_connect (server, username, password,
client_flags)
Page 20
Cookies
 The setcookie() function is used to create cookies. Should
be called before <html> tag.
 setcookie(name, [value], [expire], [path], [domain],
[secure]);
 <?php setcookie("uname", $name, time()+36000);
?>
 This sets a cookie named "uname" - that expires after ten
hours.
Benefit of Cookies
• Cookies are used for authenticating, tracking, and
maintaining specific information about users.
• Personalised home pages and Electronic shopping carts.
Page 21
Page 22
Sessions
 The session_start() function is used to create a
session. Should be called before <html> tag.
<?php
session_start();
?>
 Session_unregister(´varname´); unregisters a
session variable.
 session_destroy() destroys a session
Page 23
Why use sessions
 A normal HTML website will not pass data from one page to
another .
 All information is forgotten when a new page is loaded
 Many websites need to pass user data from one page to
another
o for tasks like a shopping cart, which requires data(the
user's selected product) to be remembered from one
page to the next
Page 24
Storing and Accessing Session Data
Destroying a Session
Page 25
PHP Forms - $_GET Function
 The built-in $_GET function is used to collect values from a form
sent with method="get".
 Information sent from a form with the GET method is visible to
everyone (it will be displayed in the browser's address bar) and
has limits on the amount of information to send (max. 3000
characters).
Notice how the URL carries the information after the file name.
Page 26
PHP Forms - $_POST Function
 When to use method="post“
 Information sent from a form with the POST method is invisible
to others and has no limits on the amount of information to
send. Note: However, there is an 8 MB max size for the POST
method, by default (can be changed by setting the
post_max_size in the php.ini file).
And here is what the code of action.php might look like:
Page 27
Framework - what is a PHP framework?
A framework gives you standard solutions to typical problems,
e.g. for an online shop that can cover the functionality for a
customer login (including session handling), a shopping cart,
placing orders...
The big advantage of using a framework is that
 You don't need to reinvent the wheel, the code is already
there.
 The code (usually) works, it is already tested.
 Specifically for user authentication, you will most probably
have fewer security leaks as if you invented something
from scratch yourself
Page 28
The big disadvantage is that
 If you want to extend the functionality, you have to
understand OPC (other peoples code).
 If the framework contains a security hole and an exploit is
available, your site is immediately vulnerable, but you
may not have the knowledge to fix it yourself. So you
need to keep a constant lookout on security bulletins,
updates, fixes etc.
List of Popular PHP Frameworks:
1. Zend 4. Symfony
2. Laravel 5. Cake PHP
3. Phalcon 6. Code Igniter
Continue
Page 29
There are pretty good reasons to use the Frameworks:
 Code and file organization is extremely easy
 Countless numbers of tools and libraries that can help you
with:
 Form validation
 Database abstraction
 Input / Output filtering
 Session and Cookie handling
 Email, Calendar and pagination and much more
 MVC (Model View Controller) Architecture
 Security - PHP has many input and output filtering functions
which can add extra security layer to protect your website
against certain attacks.
Why Framework ??
Page 30
 CMS stands for Content Management System. It is a
application software which allows editing, publishing and
modifying content as well as website maintenance from a
central page.
 CMS provides collections of methods and procedures which
are used to manage workflow in a collaborative
environment. These methods can be manual or in-build.
 Using CMS, content can easily be managed, which include
audio and video files, computer files, and electronic
documents.
 Content Management System is dynamic ,manages dynamic
contents such as shopping cart, bloggings etc.
Content Management System
Page 31
Advantages Of CMS Technology
 Ease of use:
 Creating a website without a CMS, no matter how trivial
requires some technical knowledge, which is hard to find
and expensive to buy.
 Low cost:
 Free is my favorite price! There are free versions of all CMS
application.
 Collaborative :
 CMS also incorporate a work flow engine and facilitate the
collaborative efforts of your staff in creating, editing, and
approving content before it gets published.
 Security:
 Many CMS store your information in a database system
where access control mechanisms can more easily restrict
access to your content..
Page 32
More than 68 million websites
utilize WordPress and is one of
the most popular blogging
platforms in the world. It hosts
multiple authors and includes a
huge plugin library. WordPress’
UI is easy to use where any user
can drop a theme, add plugins,
and start blogging within some
minutes. It also boasts of strong
SEO capabilities. It is highly
flexible and easy to use too. One
of its cons is its security since it
is often a target of hackers.
WordPress
Page 33
Joomla is an open-source
content management software
which incepted from Mambo. It
includes components, plugins,
templates, modules and
languages through which
developers can add several
capabilities like dynamic
content and search functions to
a web page. It was originally
designed as an enterprise-
grade CMS and hence can
handle a huge number of
articles than WordPress. It has
some learning curve and also
lacks SEO capabilities.
Joomla
Page 34
 cPanel is a web based hosting control panel provided by many
hosting providers to website owners allowing them to manage
their websites from a web based interface. This program gives
users a graphical interface from which they can control their
portion of the Unix server. The tools provided are designed to
simplify running and controlling a website. It uses a tiered
structure that allows different levels of access. Administrators
and end users can control the different aspects of the server
and the website directly through their browser. cPanel is
generally accessed using https on port 2083 or simply by
adding “/cPanel” to the end of the host name.
Web Hosting
Page 35
Page 36
Contact Details
Reach to us using following details:
Website: www.dominantinfotech.com
Contact
no:
Parth Naik : +91 99250 36660
Nirav Patel : +91 89056 87878
E-mail: info@dominantinfotech.com
Facebook: https://www.facebook.com/Dom
inantInfotech/
LinkedIn: https://www.linkedin.com/nhom
e/?trk=hb_signin
Page 37

More Related Content

Similar to Php

Php interview questions
Php interview questionsPhp interview questions
Php interview questionssekar c
 
Php interview-questions and answers
Php interview-questions and answersPhp interview-questions and answers
Php interview-questions and answerssheibansari
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018AshokKumar3319
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPLariya Minhaz
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET Journal
 
GTU MCA PHP Interview Questions And Answers for freshers
GTU MCA PHP  Interview Questions And Answers for freshersGTU MCA PHP  Interview Questions And Answers for freshers
GTU MCA PHP Interview Questions And Answers for freshersTOPS Technologies
 
Top 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and AnswersTop 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and AnswersVineet Kumar Saini
 
Authentication and Single Sing on
Authentication and Single Sing onAuthentication and Single Sing on
Authentication and Single Sing onguest648519
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questionssubash01
 
Secure visual algorithm simulator
Secure visual algorithm simulatorSecure visual algorithm simulator
Secure visual algorithm simulatorPrachi Singhal
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfonyFrancois Zaninotto
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questionsShubham Sunny
 
Website Security
Website SecurityWebsite Security
Website SecurityCarlos Z
 

Similar to Php (20)

Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Php interview-questions and answers
Php interview-questions and answersPhp interview-questions and answers
Php interview-questions and answers
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
Oss questions
Oss questionsOss questions
Oss questions
 
PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018PHP Interview Questions for Freshers 2018
PHP Interview Questions for Freshers 2018
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHP
 
IRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHPIRJET- Lightweight MVC Framework in PHP
IRJET- Lightweight MVC Framework in PHP
 
GTU MCA PHP Interview Questions And Answers for freshers
GTU MCA PHP  Interview Questions And Answers for freshersGTU MCA PHP  Interview Questions And Answers for freshers
GTU MCA PHP Interview Questions And Answers for freshers
 
CODE IGNITER
CODE IGNITERCODE IGNITER
CODE IGNITER
 
Top 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and AnswersTop 100 PHP Interview Questions and Answers
Top 100 PHP Interview Questions and Answers
 
Flyr PHP micro-framework
Flyr PHP micro-frameworkFlyr PHP micro-framework
Flyr PHP micro-framework
 
Authentication and Single Sing on
Authentication and Single Sing onAuthentication and Single Sing on
Authentication and Single Sing on
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
Secure visual algorithm simulator
Secure visual algorithm simulatorSecure visual algorithm simulator
Secure visual algorithm simulator
 
Development withforce
Development withforceDevelopment withforce
Development withforce
 
Simplify your professional web development with symfony
Simplify your professional web development with symfonySimplify your professional web development with symfony
Simplify your professional web development with symfony
 
Php interview questions
Php interview questionsPhp interview questions
Php interview questions
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
It and ej
It and ejIt and ej
It and ej
 
Website Security
Website SecurityWebsite Security
Website Security
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 

Php

  • 2. Page 2 Dominant Infotech "Dominant InfoTech” provides a comprehensive range of web and software development outsourcing services. Listed below are the core areas that we provide our services in:  Web Development  Web Design  Mobile App. Development  E-commerce Solution  CMS Websites  SEO  Logo & Graphics Design  Provide Training
  • 3. Page 3 Technologies Web Technologies  PHP  .NET  JAVA(JSP)  WORDPRESS  MAGENTO  JOOMLA  OPENCART  WOOCOMMERCE  XSLT  XML  HTML/CSS  AJAX  J-Query  JS (Node + Angular)  Web Services .NET Technologies  XAML  WPF  WCF  WWF Mobile Technologies  ANDROID  I-PHONE  I-PAD
  • 4. Page 4 Différences Between PHP , Asp.net And JSP
  • 5. Page 5 PHP :- Personal Home Page What is PHP?  "PHP: Hypertext Pre-processor“ .  PHP is a widely-used, open source scripting language  PHP scripts are executed on the server What Can PHP Do?  PHP can generate dynamic page content  PHP can create, open, read, write, delete, and close files on the server  PHP can collect form data and can add, delete, modify data in your database.  PHP can send and receive cookies  PHP can be used to control user-access and encrypt data.
  • 6. Page 6 Server Are distinguish Based on Operating System You Have :-  WAMP  MAMP  XAMP  LAMP Web Server ???
  • 7. Page 7  The phpinfo() function shows the php environment  Use this to read system and server variables, setting stored in php.ini, versions, and modules  Notice that many of these data are in arrays  This is the first script you may write… Phpinfo() :- <BODY> <P> <?php $myvar = "Hello World!"; echo $myvar; </BODY> <?php echo "<html><head><title>Howdy </title> …?>
  • 8. Page 8 PHP Conditional Statements  if statement - use this statement to execute some code only if a specified condition is true  if...else statement - use this statement to execute some code if a condition is true and another code if the condition is false  if...else if....else statement - use this statement to select one of several blocks of code to be executed  switch statement - use this statement to select one of many blocks of code to be executed
  • 9. Page 9 PHP Loops  while - loops through a block of code while a specified condition is true  do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true  for - loops through a block of code a specified number of times  foreach - loops through a block of code for each element in an array
  • 11. Page 11 PHP Arrays In PHP, there are three kind of arrays:  Numeric array - An array with a numeric index  Associative array - An array where each ID key is associated with a value  Multidimensional array - An array containing one or more arrays
  • 12. Page 12 PHP Numeric Arrays  A numeric array stores each array element with a numeric index.  There are two methods to create a numeric array. In the following example the index is automatically assigned (the index starts at 0): In the following example we assign the index manually:
  • 13. Page 13 PHP Numeric Arrays  In the following example you access the variable values by referring to the array name and index:  The code above will output:
  • 14. Page 14 PHP Associative Arrays  With an associative array, each ID key is associated with a value.  When storing data about specific named values, a numerical array is not always the best way to do it.  With associative arrays we can use the values as keys and assign values to them.
  • 16. Page 16 PHP Multidimensional Arrays  In a multidimensional array, each element in the main array can also be an array. And each element in the sub-array can be an array, and so on.
  • 17. Page 17 Include Files  include “header.php”; and include (“footer.php”);  This inserts files; the code in files will be inserted into current code.  require is identical to include except upon failure it will also produce a fatal E_COMPILE_ERROR level error. In other words, it will halt the script whereas include only emits a warning (E_WARNING) which allows the script to continue.  The include_once statement includes and evaluates the specified file during the execution of the script.  This is a behavior similar to the include statement, with the only difference being that if the code from a file has already been included, it will not be included again.  The require_once statement is identical to require except PHP will check if the file has already been included.
  • 18. Page 18 MySQL Connectivity Commands  mysql_select_db() o The mysql_select_db() function sets the active MySQL database. o This function returns TRUE on success, or FALSE on failure. Syntax: o mysql_select_db(connection, database)  mysql_query() o The mysql_query() function executes a query on a MySQL database. o This function returns the query handle for SELECT queries, TRUE/FALSE for other queries, or FALSE on failure.
  • 19. Page 19 MySQL Connectivity Commands Syntax:- o mysql_query(connection ,query)  mysql_fetch_row() o The mysql_fetch_row() function returns a row from a recordset Syntax:- o mysql_fetch_row(data)  Mysql_Connect() o The mysql_connect() function is used to open a connection to a MySQL server. Syntax:- o mysql_connect (server, username, password, client_flags)
  • 20. Page 20 Cookies  The setcookie() function is used to create cookies. Should be called before <html> tag.  setcookie(name, [value], [expire], [path], [domain], [secure]);  <?php setcookie("uname", $name, time()+36000); ?>  This sets a cookie named "uname" - that expires after ten hours. Benefit of Cookies • Cookies are used for authenticating, tracking, and maintaining specific information about users. • Personalised home pages and Electronic shopping carts.
  • 22. Page 22 Sessions  The session_start() function is used to create a session. Should be called before <html> tag. <?php session_start(); ?>  Session_unregister(´varname´); unregisters a session variable.  session_destroy() destroys a session
  • 23. Page 23 Why use sessions  A normal HTML website will not pass data from one page to another .  All information is forgotten when a new page is loaded  Many websites need to pass user data from one page to another o for tasks like a shopping cart, which requires data(the user's selected product) to be remembered from one page to the next
  • 24. Page 24 Storing and Accessing Session Data Destroying a Session
  • 25. Page 25 PHP Forms - $_GET Function  The built-in $_GET function is used to collect values from a form sent with method="get".  Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar) and has limits on the amount of information to send (max. 3000 characters). Notice how the URL carries the information after the file name.
  • 26. Page 26 PHP Forms - $_POST Function  When to use method="post“  Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send. Note: However, there is an 8 MB max size for the POST method, by default (can be changed by setting the post_max_size in the php.ini file). And here is what the code of action.php might look like:
  • 27. Page 27 Framework - what is a PHP framework? A framework gives you standard solutions to typical problems, e.g. for an online shop that can cover the functionality for a customer login (including session handling), a shopping cart, placing orders... The big advantage of using a framework is that  You don't need to reinvent the wheel, the code is already there.  The code (usually) works, it is already tested.  Specifically for user authentication, you will most probably have fewer security leaks as if you invented something from scratch yourself
  • 28. Page 28 The big disadvantage is that  If you want to extend the functionality, you have to understand OPC (other peoples code).  If the framework contains a security hole and an exploit is available, your site is immediately vulnerable, but you may not have the knowledge to fix it yourself. So you need to keep a constant lookout on security bulletins, updates, fixes etc. List of Popular PHP Frameworks: 1. Zend 4. Symfony 2. Laravel 5. Cake PHP 3. Phalcon 6. Code Igniter Continue
  • 29. Page 29 There are pretty good reasons to use the Frameworks:  Code and file organization is extremely easy  Countless numbers of tools and libraries that can help you with:  Form validation  Database abstraction  Input / Output filtering  Session and Cookie handling  Email, Calendar and pagination and much more  MVC (Model View Controller) Architecture  Security - PHP has many input and output filtering functions which can add extra security layer to protect your website against certain attacks. Why Framework ??
  • 30. Page 30  CMS stands for Content Management System. It is a application software which allows editing, publishing and modifying content as well as website maintenance from a central page.  CMS provides collections of methods and procedures which are used to manage workflow in a collaborative environment. These methods can be manual or in-build.  Using CMS, content can easily be managed, which include audio and video files, computer files, and electronic documents.  Content Management System is dynamic ,manages dynamic contents such as shopping cart, bloggings etc. Content Management System
  • 31. Page 31 Advantages Of CMS Technology  Ease of use:  Creating a website without a CMS, no matter how trivial requires some technical knowledge, which is hard to find and expensive to buy.  Low cost:  Free is my favorite price! There are free versions of all CMS application.  Collaborative :  CMS also incorporate a work flow engine and facilitate the collaborative efforts of your staff in creating, editing, and approving content before it gets published.  Security:  Many CMS store your information in a database system where access control mechanisms can more easily restrict access to your content..
  • 32. Page 32 More than 68 million websites utilize WordPress and is one of the most popular blogging platforms in the world. It hosts multiple authors and includes a huge plugin library. WordPress’ UI is easy to use where any user can drop a theme, add plugins, and start blogging within some minutes. It also boasts of strong SEO capabilities. It is highly flexible and easy to use too. One of its cons is its security since it is often a target of hackers. WordPress
  • 33. Page 33 Joomla is an open-source content management software which incepted from Mambo. It includes components, plugins, templates, modules and languages through which developers can add several capabilities like dynamic content and search functions to a web page. It was originally designed as an enterprise- grade CMS and hence can handle a huge number of articles than WordPress. It has some learning curve and also lacks SEO capabilities. Joomla
  • 34. Page 34  cPanel is a web based hosting control panel provided by many hosting providers to website owners allowing them to manage their websites from a web based interface. This program gives users a graphical interface from which they can control their portion of the Unix server. The tools provided are designed to simplify running and controlling a website. It uses a tiered structure that allows different levels of access. Administrators and end users can control the different aspects of the server and the website directly through their browser. cPanel is generally accessed using https on port 2083 or simply by adding “/cPanel” to the end of the host name. Web Hosting
  • 36. Page 36 Contact Details Reach to us using following details: Website: www.dominantinfotech.com Contact no: Parth Naik : +91 99250 36660 Nirav Patel : +91 89056 87878 E-mail: info@dominantinfotech.com Facebook: https://www.facebook.com/Dom inantInfotech/ LinkedIn: https://www.linkedin.com/nhom e/?trk=hb_signin