SlideShare une entreprise Scribd logo
1  sur  53
Télécharger pour lire hors ligne
PHP and MySQL : Server Side
Scripting For Web Development
View PHP & MYSQL Course at: http://www.edureka.co/php-mysql
For more details please contact us:
US : 1800 275 9730 (toll free)
INDIA : +91 88808 62004
Email Us : sales@edureka.co
For Queries:
Post on Twitter @edurekaIN: #askEdureka
Post on Facebook /edurekaIN
Slide 2 http://www.edureka.co/php-mysql
Objectives
At the end of this module, you will be able to understand:
 Basics of PHP
 Conditional Logic and Loops
 PHP Form Handling
 PHP Functions
 Object Oriented Concepts
 Implement MySQL with PHP
Slide 3 http://www.edureka.co/php-mysql
PHP & MySQL - Overview
 PHP & MySQL is an open-source
 PHP & MySQL are two key components in the open-source LAMP stack
 It is the most appropriate tool for developing dynamic web pages. For example, we can develop informative forums,
chatting platforms, e-commerce shopping carts, CRM solutions, community websites and database driven sites
 PHP with MySQL is a powerful combination showing the real power of Server-Side scripting
 PHP has a wide range of MySQL functions available with the help of a separate module
Slide 4 http://www.edureka.co/php-mysql
Benefits of PHP & MySQL
PHP web development means developing websites and dynamic web pages using the versatile and capable server-side
scripting language
CAPABLE
PLATFORM
INDEPENDENT
SUPPORTS ALL
MAJOR WEB
SERVERS
SUPPORTS ALL
MAJOR DATABASES
FREE OF
COST
FASTER
DEVELOPMENTS
LARGE
COMMUNITIES
EASY
PROVEN AND
TRUSTED
SECURE
Slide 5 http://www.edureka.co/php-mysql
Intricacies of PHP & MySQL
Dynamic and Weak Typing
Variable Variables
Dynamic Arrays
Dynamic Constants
Dynamic Functions
Dynamic Code
Dynamic Includes
Built-in Functions
Superglobals
Slide 6 http://www.edureka.co/php-mysql
What is PHP?
 PHP is the web development language written by and for web developers.
 PHP stands for Hypertext Preprocessor.
 It was originally named as Personal Home Page Tools and later on as Professional Home Page.
 It is a server-side script, which can be embedded in HTML or used as a standalone program script.
Slide 7 http://www.edureka.co/php-mysql
Script in PHP
 PHP can be embedded in HTML or can be written as stand-alone program by using special markup tags. They are:
<?php
//PHP code comes here
?>
 We can write PHP script in always available Notepad or get some PHP specific IDE downloaded from internet.
 We can call the file from web browser after saving it using .php extension in webserver directory.
Slide 8 http://www.edureka.co/php-mysql
PHP Example
<html>
<head>
<title>PHP Example</title>
<body>
<?php echo “This is my first PHP script."; ?>
</body>
</html>
 The rendered HTML of the above script looks like below:
<html>
<head>
<title>PHP Example</title>
<body>
<p> This is my first PHP script.</p>
</body>
</html>
Slide 9 http://www.edureka.co/php-mysql
Environment Setup
 To execute PHP script we need three components to be installed on our computer:
 Web Server - PHP supports many web server, including Apache server and IIS.
 Database - PHP supports many databases. But the extensively used is MySQL.
 PHP Parser - A Parser is required to generate HTML output from PHP code.
Slide 10 http://www.edureka.co/php-mysql
PHP Variables
 A variable in any programming language is a name to store a value that can be referenced later as required.
 In PHP, Variables are defined a name preceded by a dollar sign ($). Eg. $firstName, $last_Name etc.
 The type of a variable depends upon the value of its values.
 Equal to (=) operator is used to assign a value to a variable name, on the left-hand side and the value on the
right-hand side.
 In PHP, variables are not required to be declared before assigning a value.
 Data type for a variables is not required to be declared for a variable in PHP. Depending upon the value it is
automatically interpreted.
Slide 11 http://www.edureka.co/php-mysql
Decision Making Statements
 Statements that are used to perform certain functions depending on certain conditions are called Decision
making statements as given below:
• If…else statement
• elseif statement
• Switch statement
Slide 12 http://www.edureka.co/php-mysql
If-else Statement
<?php
If($user == “Mohit”)
{
print “Hello Mohit.”;
}
else
{
print “You are not Mohit.”;
}
?>
Slide 13 http://www.edureka.co/php-mysql
If-elseif Statement
<?php
if($day ==5) {
print(“Five team members. <br>”);
} elseif($day ==4) {
print(“Four team members <br>”);
} elseif($day ==3) {
print(“Three team members <br>”);
} elseif($day ==2) {
print(“Two team members <br>”);
} elseif($day ==1) {
print(“One team members <br>”);
}
?>
Slide 14 http://www.edureka.co/php-mysql
Switch Statement
<?php
switch($day)
{
case 3:
print(“Three golden rings <br>”);
break;
case 2:
print(“Two golden rings <br>”);
break;
default:
print(“One golden ring <br>”);
}
?>
Slide 15 http://www.edureka.co/php-mysql
Looping Statements
 Following are the various looping statements in PHP:
• For loop
• Foreach loop
• While loop
• Do…while loop
Slide 16 http://www.edureka.co/php-mysql
For Statement
 A for statement execution starts with evaluation of initial-expression, which is initialization of counter variable .
 Then evaluation of termination-check is done. if false, the for statement concludes, and if true, the statement
executes.
 Finally, the loop-end-expression is executed and the loop begins again with termination–check.
Example:
<?php
for($counter=1 //initial expression
$counter<4; //termination checks
$counter++ //loop-end expressions) {
print(“$counter<br />”);
}
?>
Result:
1
2
3
Slide 17 http://www.edureka.co/php-mysql
Foreach Statement
 We use foreach loop to iterate through arrays and objects.
Example:
<?php
$months = array(“January", “February", “March", “April“,
”May”, ”June”, ”July”, ”August”, ”September”, ”October”,
”November”, ”December”);
foreach ($months as $value) {
echo "$value <br>";
}
?>
Result:
January
February
March
April
May
June
July
August
September
October
November
December
Slide 18 http://www.edureka.co/php-mysql
While Statement
 The while loop evaluates the condition expression as Boolean. if true, it executes statements and then starts
again by evaluating condition. If the condition is false, the loop terminates.
Example:
<?php
$count=1;
While($counter<=6)
{
print(“Counter value is $counter <br>”);
$counter = $counter++;
}
?>
Result:
Count value is 1
Count value is 2
Count value is 3
Count value is 4
Count value is 5
Count value is 6
Slide 19 http://www.edureka.co/php-mysql
Do-While Statement
 The only difference between while and do-while is that the do-while will execute the statement at least once.
 The statement is executed once, and then the expression is evaluated. If the expression is true, the statement is
repeated until the expression becomes false.
Example:
<?php
$counter=50;
do {
print(“Counter value is $counter. <br>”);
$counter = $counter + 1;
}
While($counter<=10)
?>
Result:
Counter value is 50.
Slide 20 http://www.edureka.co/php-mysql
Break Statement
 The break command exits from the inner most loop statements that contain it.
Example:
<?php
for($x=1; $x<10; $x++) {
If($x % 2 !=0) {
break;
print(“$x “);
}
}
?>
Result:
The above code prints nothing because
1 is odd which terminates the for loop
immediately.
Slide 21 http://www.edureka.co/php-mysql
Continue Statement
 The continue command skips to the end of the current iteration of the innermost loop that contains it.
Example:
<?php
for($x=1; $x<10; $x++) {
if($x % 2 !=0) {
continue;
}
print(“$x “);
}
?>
Result:
2 4 6 8
Here, the continue statement will skip any
of odd numbers. It will print only the even
numbers.
Slide 22 http://www.edureka.co/php-mysql
PHP Forms
 Form is a web page which allows user to enter data.
 Forms contains many elements like text box, text area, checkbox, radio button and submit button
 User enters information in the form elements
 And, the entered information are sent to the server for processing
 Using HTML we can create forms and using PHP we can process form elements
 Let us see an example in the upcoming slides
Slide 23 http://www.edureka.co/php-mysql
HTML Form
 See the below example for HTML form with two text boxes and one submit button
<html>
<body>
<form action=“save.php" method="post">
First Name: <input type="text" name=“firstname"><br>
Last Name: <input type="text" name=“lastname"><br>
<input type="submit">
</form>
</body>
</html>
 The user enters the above information and clicks the submit button, the information is sent to a file called
“save.php”
Slide 24 http://www.edureka.co/php-mysql
Processing Forms
 The form data is sent to a PHP file for processing
 We can send form data to server using two methods
• GET method
• POST method
 In the previous code, we used POST method to send data. See the below example, to display the submitted data.
To print the values, use the below code in save.php
<?php
Your First name is: <?php echo $_POST["firstname"]; ?>
<br>
Your Lastname is: <?php echo $_POST["lastname"]; ?>
?>
Slide 25 http://www.edureka.co/php-mysql
Get Method
 GET method passes argument from one page to the next page.
 It appends the indicated variable name(s) and values(s) to the URL. The value and the page name separated by
question-mark(?)
<form action=“display.php” method=“get”>
Name: <input type=“text” name=“name”><br/>
Email:<input type=“text” name=“email”><br/>
<input type=“submit” value=“submit”>
</form>
<?php
echo “Name: ”.$_GET*‘name’+;
echo “Email: ”.$_GET*‘email’+;
?>
Slide 26 http://www.edureka.co/php-mysql
Get Method (Continued)
 Advantage:
• It constructs an actual new and differentiable URL query string. Users can now bookmark this page
 Disadvantage:
• The GET method is not suitable for logins because the username and password are fully visible onscreen as
well as potentially stored in the client browser’s memory as a visited page
• Every GET submission is recorded in the web server log, data set included
• Because the GET method assigns data to a server environment variable, the length of the URL is limited
Slide 27 http://www.edureka.co/php-mysql
Post Method
 POST is the preferred method of form submission
 The form data is included in the body of the form when it is forwarding to the processing agent. There will be no
change in the URL
<form action=“display.php” method=“post”>
Name: <input type=“text” name=“name”><br/>
Email:<input type=“text” name=“email”><br/>
<input type=“submit” value=“submit”>
</form>
 POST Method data can be accessed using $_POST variable
<?php
echo “Name: ”.$_POST*‘name’+;
echo “Email: ”.$_POST*‘email’+;
?>
Slide 28 http://www.edureka.co/php-mysql
Post Method (Continued)
 Advantages:
• It is more secure than GET because user-entered information is never visible in the URL
• It is much larger limit on the amount of data than can be passed
 Disadvantages:
• The results at a given moment cannot be bookmarked
• This methods can be incompatible with certain firewall setups, which strip the form data as a security
measure
Slide 29 http://www.edureka.co/php-mysql
PHP Functions
 A function is a set of codes which are used to perform some specific tasks
 Its main advantage is reusability. Instead of defining a code repeatedly, we can create functions and use them
when needed
 The function will not execute directly when the program loads. We need to call a function
 There are two types of function available in PHP
• Built-in functions - The real power of PHP is its functions. PHP has more than 1000 built-in functions. They
can be invoked directly
• User defined functions - We can also create our own functions. We will discuss about the creation of our
own functions in next slide
Slide 30 http://www.edureka.co/php-mysql
PHP Functions Syntax
Example:
function functionName() {
set of code to be executed;
}
 Syntax to call a function:
functionName();
 Rules to follow while naming a function:
• Function names are NOT case-sensitive
• Function name starts with a letter or underscore
• Function name cannot start with numbers
Slide 31 http://www.edureka.co/php-mysql
PHP Functions Return Value
 Function can return a value. It will return one value or more than one value using array
 It returns the value using the return keyword. If the return statement is found in the function it will stop
execution and send the value to the callback function.
Slide 32 http://www.edureka.co/php-mysql
Function Parameters
 Function parameters are variables passes to the function inside the parentheses. They are declared much like a
typical variable would be:
<?php
// multiply a value by 10 and return it to the caller
function multiply ($value) {
$value = $value * 10;
return $value;
}
$retval= multiply (10);
Print "Return value is $retvaln";
?>
Slide 33 http://www.edureka.co/php-mysql
Object Oriented Concepts
 Object Oriented Programming (OOP) is a programming concept used to design our application
• Applications can be of any type
• Web based application
• Window based application
• It is used to write programming in object model structure
 Advantages of Object Oriented Programming
• Re-Usability of your code
• Easy to Maintain
• Good Level of Abstraction
Slide 34 http://www.edureka.co/php-mysql
Classes
 Defining PHP Classes
• Class is a user defined data type which includes functions and member variables
• It is used to define object. It is the blueprint of the object
 Class Declaration
• Class is declared using class keyword followed by the name
• A set of braces used to declare variables and functions
• Variables can be declared using var keyword followed by $
<?php
class classname {
var$var1;
var$var2 = "constant text";
function myfunc($arg1, $arg2) {
//function code
}
}
?>
Slide 35 http://www.edureka.co/php-mysql
Creating Objects in PHP
 In Object Oriented language, properties are called member variables. And, behaviors are called member
functions
• Once we defined our class, then we can create as many objects using the new operator
• Pen is class, Hero pen, Reynolds etc are called its objects
 Syntax
$objectname= new classname();
Example:
$hero = new Pen;
$reynolds= new Pen;
Slide 36 http://www.edureka.co/php-mysql
Calling Member Functions
 After creating objects, we can access our member functions
 We can only access the member function of the class of which we created objects
 Let us see how to access member functions using the objects $hero, $reynolds
Example
Assigning values to the object $hero by accessing its member functions
$hero -> setPrice("100"); //assigns value 100 to price variable
$hero -> setColor("Green"); //assigns value green to color variable
$hero -> setType("Ink Pen"); //assigns value Ink Pen to type variable
$hero -> setWritingcolor(“blue”); //assigns value blue to writing color of the pen
Slide 37 http://www.edureka.co/php-mysql
Constructor Functions
 Constructor is a special type of function
 It is automatically invoked when an object is created. So we can use this function for initialization
 To define a constructor, PHP provides a special function called __construct(). We can pass any number of
arguments to this function
 A function can also become a constructor, if it defined by the same name of the class
 Two ways to declare constructors
• __construct() function
• Define function using same class name
Slide 38 http://www.edureka.co/php-mysql
Constructor Functions (Continued)
Method 1:
class classname
{
function __construct(p1, p2, ..., pN]){
/* Class initialization code */
}
}
Method 2:
class classname
{
function classname(p1, p2, ..., pN]){
/* Class initialization code */
}
}
Slide 39 http://www.edureka.co/php-mysql
Inheritance
 Inheritance is the method of inheriting one class properties to other class
 We can achieve this by using ‘extends’ keyword
Class parentclass
{
//parent class definition
}
Class childclass extends parentclass
{
//child class definition
}
Slide 40 http://www.edureka.co/php-mysql
Function Overriding
 Function overriding is nothing but overriding the function of parent class to child class and modify those
functions
 Using overriding, we can alter function definition in child class
 To override, we need to create same function in sub class which it is in base class
Slide 41 http://www.edureka.co/php-mysql
class baseclass {
public function one() {
echo “First function”;
}
public function two() {
echo “second function”;
}
}
class childclass extends baseclass {
function two($text) //overriding function2
{
echo "$text ";
}
}
$text = new childclass();
$text->two("Sachin");//it will print Sachin
Function Overriding
 Example:
Slide 42 http://www.edureka.co/php-mysql
Access Modifiers
 Access modifiers is nothing but the level of access and the visibility of the member variables and member
functions
 We can use this access modifiers to show or hide data
 We have three access modifiers in PHP
• Private
• Protected
• Public
Slide 43 http://www.edureka.co/php-mysql
Final Keyword
 Final is a keyword
 If we define the class as final then we cannot extend the class
 If we declare the method as final we cannot override the method
 Syntax for Defining Function as Final
final public function functioname()
{
//function definition comes here
}
 Syntax for Defining Class as Final
final class classname
{
//class definition comes here
}
Slide 44 http://www.edureka.co/php-mysql
Database
 A database is a unique application that organizes a group of data
 Each database application has one or more APIs for creating, managing, accessing, searching and duplicating the
data it holds
 Hence, the data can easily be accessed, managed, and updated
Slide 45 http://www.edureka.co/php-mysql
MySQL Introduction
 MySQL is a database system which is used on the web and runs on the server
 It uses standard SQL
 It is very fast, reliable and easy to use and also it is ideal for both small and large applications
Slide 46 http://www.edureka.co/php-mysql
MySQL Connection
 Using PHP Script
• Using mysql_connect() function we can open a database connection
• This function requires five parameters and all are optional
 Syntax
mysql_connect(server,user,pass,new_link,client_flag);
Slide 47 http://www.edureka.co/php-mysql
MySQL Disconnect
 Using PHP Script
• Using mysql_close() function we can disconnect from MySQL server
• This function takes single parameter
 Syntax
mysql_close(resource $link_identifier);
 If we did not specify any parameter then the last opened database is closed
Slide 48 http://www.edureka.co/php-mysql
Execute MySQL Queries
 Using PHP function mysql_query() we can run a MySQL query.
 This function needs two parameters and returns Boolean value
 Function Syntax
mysql_query(sql_query, connection);
 First parameter is mandatory. sql_query parameter is mandatory. It specifies the original query to be executed
 The second parameter is optional. It is the connection parameter. If we did not specified, it takes the last opened
connection
 Consider we are going to create a database ‘student_details’ to store student information
Slide 49 http://www.edureka.co/php-mysql
Fetching Data
 Select Query
• Data Manipulation –Select Query
• Select statement is used to fetch data from the database
• Fetching data can be simple queries or complex queries
 To select data using PHP script, we can use mysql_query() function
• Write the select query inside the mysql_query() function
• This function is used to execute MySQL queries
• To fetch the selected data using select query we can use two functions
mysql_fetch_array()
mysql_fetch_assoc()
Questions
Slide 50 http://www.edureka.co/php-mysqlTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
Slide 51 http://www.edureka.co/php-mysql
Course Topics
 Module 1
» PHP Basics and Conditional Logic
 Module 2
» Functions and Error Handling
 Module 3
» Object Oriented Programming
 Module 4
» MySQL Installation and Basics
 Module 5
» Advance Queries and Data Manipulation
using PHP
Module 6
» MVC Infrastructure Basics & Introduction to
CakePHP
Module 7
» CakePHP Controller, Views and Layout
 Module 8
» Models and Database Interaction in CakePHP
 Module 9
» Creating Dynamic Forms using CakePHP Html
Helpers
 Module 10
» Using MVC & CakePHP to develop a website
Slide 52
LIVE Online Class
Class Recording in LMS
24/7 Post Class Support
Module Wise Quiz
Project Work
Verifiable Certificate
http://www.edureka.co/php-mysql
How it Works?
PHP and MySQL : Server Side Scripting For Web Development

Contenu connexe

Tendances (20)

Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
PHP
PHPPHP
PHP
 
Php Lecture Notes
Php Lecture NotesPhp Lecture Notes
Php Lecture Notes
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Laravel Tutorial PPT
Laravel Tutorial PPTLaravel Tutorial PPT
Laravel Tutorial PPT
 
408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx408372362-Student-Result-management-System-project-report-docx.docx
408372362-Student-Result-management-System-project-report-docx.docx
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Proxy Server
Proxy ServerProxy Server
Proxy Server
 
Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014Http request&response by Vignesh 15 MAR 2014
Http request&response by Vignesh 15 MAR 2014
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
Database Connectivity in PHP
Database Connectivity in PHPDatabase Connectivity in PHP
Database Connectivity in PHP
 
Introduction to Html5
Introduction to Html5Introduction to Html5
Introduction to Html5
 
Files in php
Files in phpFiles in php
Files in php
 
Student management system(stms)
Student management system(stms)Student management system(stms)
Student management system(stms)
 
Apache ppt
Apache pptApache ppt
Apache ppt
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
Php forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligetiPhp forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligeti
 
Java Servlets
Java ServletsJava Servlets
Java Servlets
 
Web Server - Internet Applications
Web Server - Internet ApplicationsWeb Server - Internet Applications
Web Server - Internet Applications
 
Event In JavaScript
Event In JavaScriptEvent In JavaScript
Event In JavaScript
 

En vedette

Webinar: PHP and MySQL - Server-side Scripting Language for Web Development
Webinar: PHP and MySQL - Server-side Scripting Language for Web Development  Webinar: PHP and MySQL - Server-side Scripting Language for Web Development
Webinar: PHP and MySQL - Server-side Scripting Language for Web Development Edureka!
 
Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011Eli White
 
Part 2 - Hadoop Data Loading using Hadoop Tools and ODI12c
Part 2 - Hadoop Data Loading using Hadoop Tools and ODI12cPart 2 - Hadoop Data Loading using Hadoop Tools and ODI12c
Part 2 - Hadoop Data Loading using Hadoop Tools and ODI12cMark Rittman
 
Web Crawling and Data Gathering with Apache Nutch
Web Crawling and Data Gathering with Apache NutchWeb Crawling and Data Gathering with Apache Nutch
Web Crawling and Data Gathering with Apache NutchSteve Watt
 
Large scale crawling with Apache Nutch
Large scale crawling with Apache NutchLarge scale crawling with Apache Nutch
Large scale crawling with Apache NutchJulien Nioche
 
Why use big data tools to do web analytics? And how to do it using Snowplow a...
Why use big data tools to do web analytics? And how to do it using Snowplow a...Why use big data tools to do web analytics? And how to do it using Snowplow a...
Why use big data tools to do web analytics? And how to do it using Snowplow a...yalisassoon
 
Python in the Hadoop Ecosystem (Rock Health presentation)
Python in the Hadoop Ecosystem (Rock Health presentation)Python in the Hadoop Ecosystem (Rock Health presentation)
Python in the Hadoop Ecosystem (Rock Health presentation)Uri Laserson
 
HIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on HadoopHIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on HadoopZheng Shao
 
Titan: Big Graph Data with Cassandra
Titan: Big Graph Data with CassandraTitan: Big Graph Data with Cassandra
Titan: Big Graph Data with CassandraMatthias Broecheler
 
Hadoop demo ppt
Hadoop demo pptHadoop demo ppt
Hadoop demo pptPhil Young
 

En vedette (11)

Webinar: PHP and MySQL - Server-side Scripting Language for Web Development
Webinar: PHP and MySQL - Server-side Scripting Language for Web Development  Webinar: PHP and MySQL - Server-side Scripting Language for Web Development
Webinar: PHP and MySQL - Server-side Scripting Language for Web Development
 
CV - Vivek Bajpai
CV - Vivek BajpaiCV - Vivek Bajpai
CV - Vivek Bajpai
 
Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011Big data and APIs for PHP developers - SXSW 2011
Big data and APIs for PHP developers - SXSW 2011
 
Part 2 - Hadoop Data Loading using Hadoop Tools and ODI12c
Part 2 - Hadoop Data Loading using Hadoop Tools and ODI12cPart 2 - Hadoop Data Loading using Hadoop Tools and ODI12c
Part 2 - Hadoop Data Loading using Hadoop Tools and ODI12c
 
Web Crawling and Data Gathering with Apache Nutch
Web Crawling and Data Gathering with Apache NutchWeb Crawling and Data Gathering with Apache Nutch
Web Crawling and Data Gathering with Apache Nutch
 
Large scale crawling with Apache Nutch
Large scale crawling with Apache NutchLarge scale crawling with Apache Nutch
Large scale crawling with Apache Nutch
 
Why use big data tools to do web analytics? And how to do it using Snowplow a...
Why use big data tools to do web analytics? And how to do it using Snowplow a...Why use big data tools to do web analytics? And how to do it using Snowplow a...
Why use big data tools to do web analytics? And how to do it using Snowplow a...
 
Python in the Hadoop Ecosystem (Rock Health presentation)
Python in the Hadoop Ecosystem (Rock Health presentation)Python in the Hadoop Ecosystem (Rock Health presentation)
Python in the Hadoop Ecosystem (Rock Health presentation)
 
HIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on HadoopHIVE: Data Warehousing & Analytics on Hadoop
HIVE: Data Warehousing & Analytics on Hadoop
 
Titan: Big Graph Data with Cassandra
Titan: Big Graph Data with CassandraTitan: Big Graph Data with Cassandra
Titan: Big Graph Data with Cassandra
 
Hadoop demo ppt
Hadoop demo pptHadoop demo ppt
Hadoop demo ppt
 

Similaire à PHP and MySQL : Server Side Scripting For Web Development

1 Introduction to PHP Overview This lab walks y.docx
1  Introduction to PHP Overview This lab walks y.docx1  Introduction to PHP Overview This lab walks y.docx
1 Introduction to PHP Overview This lab walks y.docxhoney725342
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPLariya Minhaz
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Muhamad Al Imran
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Muhamad Al Imran
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />tutorialsruby
 
php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3tutorialsruby
 
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/tutorialsruby
 
php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3tutorialsruby
 
FYBSC IT Web Programming Unit IV PHP and MySQL
FYBSC IT Web Programming Unit IV  PHP and MySQLFYBSC IT Web Programming Unit IV  PHP and MySQL
FYBSC IT Web Programming Unit IV PHP and MySQLArti Parab Academics
 
Developing web applications
Developing web applicationsDeveloping web applications
Developing web applicationssalissal
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolmentRajib Ahmed
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfShaimaaMohamedGalal
 
10_introduction_php.ppt
10_introduction_php.ppt10_introduction_php.ppt
10_introduction_php.pptGiyaShefin
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPtutorialsruby
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPtutorialsruby
 

Similaire à PHP and MySQL : Server Side Scripting For Web Development (20)

1 Introduction to PHP Overview This lab walks y.docx
1  Introduction to PHP Overview This lab walks y.docx1  Introduction to PHP Overview This lab walks y.docx
1 Introduction to PHP Overview This lab walks y.docx
 
PHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHPPHP Unit-1 Introduction to PHP
PHP Unit-1 Introduction to PHP
 
Php i basic chapter 3
Php i basic chapter 3Php i basic chapter 3
Php i basic chapter 3
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
 
&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />&lt;img src="../i/r_14.png" />
&lt;img src="../i/r_14.png" />
 
php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3
 
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
&lt;b>PHP&lt;/b>/MySQL &lt;b>Tutorial&lt;/b> webmonkey/programming/
 
php-mysql-tutorial-part-3
php-mysql-tutorial-part-3php-mysql-tutorial-part-3
php-mysql-tutorial-part-3
 
FYBSC IT Web Programming Unit IV PHP and MySQL
FYBSC IT Web Programming Unit IV  PHP and MySQLFYBSC IT Web Programming Unit IV  PHP and MySQL
FYBSC IT Web Programming Unit IV PHP and MySQL
 
PHP and MySQL.ppt
PHP and MySQL.pptPHP and MySQL.ppt
PHP and MySQL.ppt
 
Phpbasics
PhpbasicsPhpbasics
Phpbasics
 
Developing web applications
Developing web applicationsDeveloping web applications
Developing web applications
 
Starting with PHP and Web devepolment
Starting with PHP and Web devepolmentStarting with PHP and Web devepolment
Starting with PHP and Web devepolment
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdf
 
10_introduction_php.ppt
10_introduction_php.ppt10_introduction_php.ppt
10_introduction_php.ppt
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHP
 
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHPWinter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHP
 
php 1
php 1php 1
php 1
 
introduction_php.ppt
introduction_php.pptintroduction_php.ppt
introduction_php.ppt
 

Plus de Edureka!

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaEdureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaEdureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaEdureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaEdureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaEdureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaEdureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaEdureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaEdureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaEdureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaEdureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | EdurekaEdureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEdureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEdureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaEdureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaEdureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaEdureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaEdureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaEdureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | EdurekaEdureka!
 

Plus de Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Dernier (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

PHP and MySQL : Server Side Scripting For Web Development

  • 1. PHP and MySQL : Server Side Scripting For Web Development View PHP & MYSQL Course at: http://www.edureka.co/php-mysql For more details please contact us: US : 1800 275 9730 (toll free) INDIA : +91 88808 62004 Email Us : sales@edureka.co For Queries: Post on Twitter @edurekaIN: #askEdureka Post on Facebook /edurekaIN
  • 2. Slide 2 http://www.edureka.co/php-mysql Objectives At the end of this module, you will be able to understand:  Basics of PHP  Conditional Logic and Loops  PHP Form Handling  PHP Functions  Object Oriented Concepts  Implement MySQL with PHP
  • 3. Slide 3 http://www.edureka.co/php-mysql PHP & MySQL - Overview  PHP & MySQL is an open-source  PHP & MySQL are two key components in the open-source LAMP stack  It is the most appropriate tool for developing dynamic web pages. For example, we can develop informative forums, chatting platforms, e-commerce shopping carts, CRM solutions, community websites and database driven sites  PHP with MySQL is a powerful combination showing the real power of Server-Side scripting  PHP has a wide range of MySQL functions available with the help of a separate module
  • 4. Slide 4 http://www.edureka.co/php-mysql Benefits of PHP & MySQL PHP web development means developing websites and dynamic web pages using the versatile and capable server-side scripting language CAPABLE PLATFORM INDEPENDENT SUPPORTS ALL MAJOR WEB SERVERS SUPPORTS ALL MAJOR DATABASES FREE OF COST FASTER DEVELOPMENTS LARGE COMMUNITIES EASY PROVEN AND TRUSTED SECURE
  • 5. Slide 5 http://www.edureka.co/php-mysql Intricacies of PHP & MySQL Dynamic and Weak Typing Variable Variables Dynamic Arrays Dynamic Constants Dynamic Functions Dynamic Code Dynamic Includes Built-in Functions Superglobals
  • 6. Slide 6 http://www.edureka.co/php-mysql What is PHP?  PHP is the web development language written by and for web developers.  PHP stands for Hypertext Preprocessor.  It was originally named as Personal Home Page Tools and later on as Professional Home Page.  It is a server-side script, which can be embedded in HTML or used as a standalone program script.
  • 7. Slide 7 http://www.edureka.co/php-mysql Script in PHP  PHP can be embedded in HTML or can be written as stand-alone program by using special markup tags. They are: <?php //PHP code comes here ?>  We can write PHP script in always available Notepad or get some PHP specific IDE downloaded from internet.  We can call the file from web browser after saving it using .php extension in webserver directory.
  • 8. Slide 8 http://www.edureka.co/php-mysql PHP Example <html> <head> <title>PHP Example</title> <body> <?php echo “This is my first PHP script."; ?> </body> </html>  The rendered HTML of the above script looks like below: <html> <head> <title>PHP Example</title> <body> <p> This is my first PHP script.</p> </body> </html>
  • 9. Slide 9 http://www.edureka.co/php-mysql Environment Setup  To execute PHP script we need three components to be installed on our computer:  Web Server - PHP supports many web server, including Apache server and IIS.  Database - PHP supports many databases. But the extensively used is MySQL.  PHP Parser - A Parser is required to generate HTML output from PHP code.
  • 10. Slide 10 http://www.edureka.co/php-mysql PHP Variables  A variable in any programming language is a name to store a value that can be referenced later as required.  In PHP, Variables are defined a name preceded by a dollar sign ($). Eg. $firstName, $last_Name etc.  The type of a variable depends upon the value of its values.  Equal to (=) operator is used to assign a value to a variable name, on the left-hand side and the value on the right-hand side.  In PHP, variables are not required to be declared before assigning a value.  Data type for a variables is not required to be declared for a variable in PHP. Depending upon the value it is automatically interpreted.
  • 11. Slide 11 http://www.edureka.co/php-mysql Decision Making Statements  Statements that are used to perform certain functions depending on certain conditions are called Decision making statements as given below: • If…else statement • elseif statement • Switch statement
  • 12. Slide 12 http://www.edureka.co/php-mysql If-else Statement <?php If($user == “Mohit”) { print “Hello Mohit.”; } else { print “You are not Mohit.”; } ?>
  • 13. Slide 13 http://www.edureka.co/php-mysql If-elseif Statement <?php if($day ==5) { print(“Five team members. <br>”); } elseif($day ==4) { print(“Four team members <br>”); } elseif($day ==3) { print(“Three team members <br>”); } elseif($day ==2) { print(“Two team members <br>”); } elseif($day ==1) { print(“One team members <br>”); } ?>
  • 14. Slide 14 http://www.edureka.co/php-mysql Switch Statement <?php switch($day) { case 3: print(“Three golden rings <br>”); break; case 2: print(“Two golden rings <br>”); break; default: print(“One golden ring <br>”); } ?>
  • 15. Slide 15 http://www.edureka.co/php-mysql Looping Statements  Following are the various looping statements in PHP: • For loop • Foreach loop • While loop • Do…while loop
  • 16. Slide 16 http://www.edureka.co/php-mysql For Statement  A for statement execution starts with evaluation of initial-expression, which is initialization of counter variable .  Then evaluation of termination-check is done. if false, the for statement concludes, and if true, the statement executes.  Finally, the loop-end-expression is executed and the loop begins again with termination–check. Example: <?php for($counter=1 //initial expression $counter<4; //termination checks $counter++ //loop-end expressions) { print(“$counter<br />”); } ?> Result: 1 2 3
  • 17. Slide 17 http://www.edureka.co/php-mysql Foreach Statement  We use foreach loop to iterate through arrays and objects. Example: <?php $months = array(“January", “February", “March", “April“, ”May”, ”June”, ”July”, ”August”, ”September”, ”October”, ”November”, ”December”); foreach ($months as $value) { echo "$value <br>"; } ?> Result: January February March April May June July August September October November December
  • 18. Slide 18 http://www.edureka.co/php-mysql While Statement  The while loop evaluates the condition expression as Boolean. if true, it executes statements and then starts again by evaluating condition. If the condition is false, the loop terminates. Example: <?php $count=1; While($counter<=6) { print(“Counter value is $counter <br>”); $counter = $counter++; } ?> Result: Count value is 1 Count value is 2 Count value is 3 Count value is 4 Count value is 5 Count value is 6
  • 19. Slide 19 http://www.edureka.co/php-mysql Do-While Statement  The only difference between while and do-while is that the do-while will execute the statement at least once.  The statement is executed once, and then the expression is evaluated. If the expression is true, the statement is repeated until the expression becomes false. Example: <?php $counter=50; do { print(“Counter value is $counter. <br>”); $counter = $counter + 1; } While($counter<=10) ?> Result: Counter value is 50.
  • 20. Slide 20 http://www.edureka.co/php-mysql Break Statement  The break command exits from the inner most loop statements that contain it. Example: <?php for($x=1; $x<10; $x++) { If($x % 2 !=0) { break; print(“$x “); } } ?> Result: The above code prints nothing because 1 is odd which terminates the for loop immediately.
  • 21. Slide 21 http://www.edureka.co/php-mysql Continue Statement  The continue command skips to the end of the current iteration of the innermost loop that contains it. Example: <?php for($x=1; $x<10; $x++) { if($x % 2 !=0) { continue; } print(“$x “); } ?> Result: 2 4 6 8 Here, the continue statement will skip any of odd numbers. It will print only the even numbers.
  • 22. Slide 22 http://www.edureka.co/php-mysql PHP Forms  Form is a web page which allows user to enter data.  Forms contains many elements like text box, text area, checkbox, radio button and submit button  User enters information in the form elements  And, the entered information are sent to the server for processing  Using HTML we can create forms and using PHP we can process form elements  Let us see an example in the upcoming slides
  • 23. Slide 23 http://www.edureka.co/php-mysql HTML Form  See the below example for HTML form with two text boxes and one submit button <html> <body> <form action=“save.php" method="post"> First Name: <input type="text" name=“firstname"><br> Last Name: <input type="text" name=“lastname"><br> <input type="submit"> </form> </body> </html>  The user enters the above information and clicks the submit button, the information is sent to a file called “save.php”
  • 24. Slide 24 http://www.edureka.co/php-mysql Processing Forms  The form data is sent to a PHP file for processing  We can send form data to server using two methods • GET method • POST method  In the previous code, we used POST method to send data. See the below example, to display the submitted data. To print the values, use the below code in save.php <?php Your First name is: <?php echo $_POST["firstname"]; ?> <br> Your Lastname is: <?php echo $_POST["lastname"]; ?> ?>
  • 25. Slide 25 http://www.edureka.co/php-mysql Get Method  GET method passes argument from one page to the next page.  It appends the indicated variable name(s) and values(s) to the URL. The value and the page name separated by question-mark(?) <form action=“display.php” method=“get”> Name: <input type=“text” name=“name”><br/> Email:<input type=“text” name=“email”><br/> <input type=“submit” value=“submit”> </form> <?php echo “Name: ”.$_GET*‘name’+; echo “Email: ”.$_GET*‘email’+; ?>
  • 26. Slide 26 http://www.edureka.co/php-mysql Get Method (Continued)  Advantage: • It constructs an actual new and differentiable URL query string. Users can now bookmark this page  Disadvantage: • The GET method is not suitable for logins because the username and password are fully visible onscreen as well as potentially stored in the client browser’s memory as a visited page • Every GET submission is recorded in the web server log, data set included • Because the GET method assigns data to a server environment variable, the length of the URL is limited
  • 27. Slide 27 http://www.edureka.co/php-mysql Post Method  POST is the preferred method of form submission  The form data is included in the body of the form when it is forwarding to the processing agent. There will be no change in the URL <form action=“display.php” method=“post”> Name: <input type=“text” name=“name”><br/> Email:<input type=“text” name=“email”><br/> <input type=“submit” value=“submit”> </form>  POST Method data can be accessed using $_POST variable <?php echo “Name: ”.$_POST*‘name’+; echo “Email: ”.$_POST*‘email’+; ?>
  • 28. Slide 28 http://www.edureka.co/php-mysql Post Method (Continued)  Advantages: • It is more secure than GET because user-entered information is never visible in the URL • It is much larger limit on the amount of data than can be passed  Disadvantages: • The results at a given moment cannot be bookmarked • This methods can be incompatible with certain firewall setups, which strip the form data as a security measure
  • 29. Slide 29 http://www.edureka.co/php-mysql PHP Functions  A function is a set of codes which are used to perform some specific tasks  Its main advantage is reusability. Instead of defining a code repeatedly, we can create functions and use them when needed  The function will not execute directly when the program loads. We need to call a function  There are two types of function available in PHP • Built-in functions - The real power of PHP is its functions. PHP has more than 1000 built-in functions. They can be invoked directly • User defined functions - We can also create our own functions. We will discuss about the creation of our own functions in next slide
  • 30. Slide 30 http://www.edureka.co/php-mysql PHP Functions Syntax Example: function functionName() { set of code to be executed; }  Syntax to call a function: functionName();  Rules to follow while naming a function: • Function names are NOT case-sensitive • Function name starts with a letter or underscore • Function name cannot start with numbers
  • 31. Slide 31 http://www.edureka.co/php-mysql PHP Functions Return Value  Function can return a value. It will return one value or more than one value using array  It returns the value using the return keyword. If the return statement is found in the function it will stop execution and send the value to the callback function.
  • 32. Slide 32 http://www.edureka.co/php-mysql Function Parameters  Function parameters are variables passes to the function inside the parentheses. They are declared much like a typical variable would be: <?php // multiply a value by 10 and return it to the caller function multiply ($value) { $value = $value * 10; return $value; } $retval= multiply (10); Print "Return value is $retvaln"; ?>
  • 33. Slide 33 http://www.edureka.co/php-mysql Object Oriented Concepts  Object Oriented Programming (OOP) is a programming concept used to design our application • Applications can be of any type • Web based application • Window based application • It is used to write programming in object model structure  Advantages of Object Oriented Programming • Re-Usability of your code • Easy to Maintain • Good Level of Abstraction
  • 34. Slide 34 http://www.edureka.co/php-mysql Classes  Defining PHP Classes • Class is a user defined data type which includes functions and member variables • It is used to define object. It is the blueprint of the object  Class Declaration • Class is declared using class keyword followed by the name • A set of braces used to declare variables and functions • Variables can be declared using var keyword followed by $ <?php class classname { var$var1; var$var2 = "constant text"; function myfunc($arg1, $arg2) { //function code } } ?>
  • 35. Slide 35 http://www.edureka.co/php-mysql Creating Objects in PHP  In Object Oriented language, properties are called member variables. And, behaviors are called member functions • Once we defined our class, then we can create as many objects using the new operator • Pen is class, Hero pen, Reynolds etc are called its objects  Syntax $objectname= new classname(); Example: $hero = new Pen; $reynolds= new Pen;
  • 36. Slide 36 http://www.edureka.co/php-mysql Calling Member Functions  After creating objects, we can access our member functions  We can only access the member function of the class of which we created objects  Let us see how to access member functions using the objects $hero, $reynolds Example Assigning values to the object $hero by accessing its member functions $hero -> setPrice("100"); //assigns value 100 to price variable $hero -> setColor("Green"); //assigns value green to color variable $hero -> setType("Ink Pen"); //assigns value Ink Pen to type variable $hero -> setWritingcolor(“blue”); //assigns value blue to writing color of the pen
  • 37. Slide 37 http://www.edureka.co/php-mysql Constructor Functions  Constructor is a special type of function  It is automatically invoked when an object is created. So we can use this function for initialization  To define a constructor, PHP provides a special function called __construct(). We can pass any number of arguments to this function  A function can also become a constructor, if it defined by the same name of the class  Two ways to declare constructors • __construct() function • Define function using same class name
  • 38. Slide 38 http://www.edureka.co/php-mysql Constructor Functions (Continued) Method 1: class classname { function __construct(p1, p2, ..., pN]){ /* Class initialization code */ } } Method 2: class classname { function classname(p1, p2, ..., pN]){ /* Class initialization code */ } }
  • 39. Slide 39 http://www.edureka.co/php-mysql Inheritance  Inheritance is the method of inheriting one class properties to other class  We can achieve this by using ‘extends’ keyword Class parentclass { //parent class definition } Class childclass extends parentclass { //child class definition }
  • 40. Slide 40 http://www.edureka.co/php-mysql Function Overriding  Function overriding is nothing but overriding the function of parent class to child class and modify those functions  Using overriding, we can alter function definition in child class  To override, we need to create same function in sub class which it is in base class
  • 41. Slide 41 http://www.edureka.co/php-mysql class baseclass { public function one() { echo “First function”; } public function two() { echo “second function”; } } class childclass extends baseclass { function two($text) //overriding function2 { echo "$text "; } } $text = new childclass(); $text->two("Sachin");//it will print Sachin Function Overriding  Example:
  • 42. Slide 42 http://www.edureka.co/php-mysql Access Modifiers  Access modifiers is nothing but the level of access and the visibility of the member variables and member functions  We can use this access modifiers to show or hide data  We have three access modifiers in PHP • Private • Protected • Public
  • 43. Slide 43 http://www.edureka.co/php-mysql Final Keyword  Final is a keyword  If we define the class as final then we cannot extend the class  If we declare the method as final we cannot override the method  Syntax for Defining Function as Final final public function functioname() { //function definition comes here }  Syntax for Defining Class as Final final class classname { //class definition comes here }
  • 44. Slide 44 http://www.edureka.co/php-mysql Database  A database is a unique application that organizes a group of data  Each database application has one or more APIs for creating, managing, accessing, searching and duplicating the data it holds  Hence, the data can easily be accessed, managed, and updated
  • 45. Slide 45 http://www.edureka.co/php-mysql MySQL Introduction  MySQL is a database system which is used on the web and runs on the server  It uses standard SQL  It is very fast, reliable and easy to use and also it is ideal for both small and large applications
  • 46. Slide 46 http://www.edureka.co/php-mysql MySQL Connection  Using PHP Script • Using mysql_connect() function we can open a database connection • This function requires five parameters and all are optional  Syntax mysql_connect(server,user,pass,new_link,client_flag);
  • 47. Slide 47 http://www.edureka.co/php-mysql MySQL Disconnect  Using PHP Script • Using mysql_close() function we can disconnect from MySQL server • This function takes single parameter  Syntax mysql_close(resource $link_identifier);  If we did not specify any parameter then the last opened database is closed
  • 48. Slide 48 http://www.edureka.co/php-mysql Execute MySQL Queries  Using PHP function mysql_query() we can run a MySQL query.  This function needs two parameters and returns Boolean value  Function Syntax mysql_query(sql_query, connection);  First parameter is mandatory. sql_query parameter is mandatory. It specifies the original query to be executed  The second parameter is optional. It is the connection parameter. If we did not specified, it takes the last opened connection  Consider we are going to create a database ‘student_details’ to store student information
  • 49. Slide 49 http://www.edureka.co/php-mysql Fetching Data  Select Query • Data Manipulation –Select Query • Select statement is used to fetch data from the database • Fetching data can be simple queries or complex queries  To select data using PHP script, we can use mysql_query() function • Write the select query inside the mysql_query() function • This function is used to execute MySQL queries • To fetch the selected data using select query we can use two functions mysql_fetch_array() mysql_fetch_assoc()
  • 50. Questions Slide 50 http://www.edureka.co/php-mysqlTwitter @edurekaIN, Facebook /edurekaIN, use #AskEdureka for Questions
  • 51. Slide 51 http://www.edureka.co/php-mysql Course Topics  Module 1 » PHP Basics and Conditional Logic  Module 2 » Functions and Error Handling  Module 3 » Object Oriented Programming  Module 4 » MySQL Installation and Basics  Module 5 » Advance Queries and Data Manipulation using PHP Module 6 » MVC Infrastructure Basics & Introduction to CakePHP Module 7 » CakePHP Controller, Views and Layout  Module 8 » Models and Database Interaction in CakePHP  Module 9 » Creating Dynamic Forms using CakePHP Html Helpers  Module 10 » Using MVC & CakePHP to develop a website
  • 52. Slide 52 LIVE Online Class Class Recording in LMS 24/7 Post Class Support Module Wise Quiz Project Work Verifiable Certificate http://www.edureka.co/php-mysql How it Works?