SlideShare a Scribd company logo
SUBHASIS NAYAK CMC PHP, MYSQL
What we will discuss ? Here we will discuss what PHP is all about? PHP MySql Apache installation PHP basics. Variables & data types Flow controls Functions
What php is all about? PHP is hugely popular, and mostly used programming language for website’s backend process.  IT is a programming language that was designed for making dynamic websites. he name PHP is a recursive acronym that stands for PHP: Hypertext Preprocessor.  Hi! I am not with time to describe more about PHP. So go the site  http://php.net  and check it out.
Continue ….. The PHP language is flexible and easy to learn quickly even if you have not done any programming in the past. If you have done any programming language like c, c++, java then you can learn PHP in one night.
Installing AMP It has three steps Installing Apache – it is very simple step by step. Installing php –  extract your php compressed package. Set the environment path. To ‘conf ‘ folder of apache=>open httpd.conf  and enable all belows LoadModule php5_module “///” AddType application/x-httpd-php.php AddTypeapplication/x-httpd-php-source.phps Installing Mysql. Doing configuration
Configure PHP To configure php go to “php.ini” Search for “register_global” check it for if not change it to off. Search for “error_reporting and display errors”. When we are writing your code enable it by doing “E_ALL”. After production disable it by doing “E_NONE” Change the  session data to store in a particular folder to do so. “session.save_path=c:/windows/temp” The default execution time is 3o seconds. It is not possible for some scripts to complete execution within 30 secs .you can change to 10 to 15 minutes. Put the value like this “max_executin time = 900” Save your “php.ini” & restart ur apache to get the effect.
Basic architecture Browser Data base Middle Ware(PHP,JSP. ASP) Web server(Apache/IIS)
Variables  All variables start with ‘$’. Variable starts with alpha numeric. Stay away from using underscore from at start of variable. Variable can contain alpha numeric. Good practice of writing variable $name $var1 $var_Name $varName
Working with numbers You can do all mathematical operation like this?
Strings String is a collection of characters treated as single entity. In PHP we put a string using: Within two double quotes = “” Within two single quotes = ‘’ $myString = “Welcome to Open Source”; $myString = ‘Welcome to Open Source’;
Bypassing the special characters Some times we need to work with special characters which is used by the php. Even some special characters are there for  Mysql. Some times we want to by pass the characters. We have to by pass the double quote in between double quote. We have to by pass the Single quote in between single quote. To do that we need to use (\) back slash before the characters.
Cont’d ….. $str =“my Name is  “Papu”  ”; $str =“my Name is  \“Papu\”  ”; $str =‘my Name is  ‘Papu’  ‘; $str =‘my Name is  \’Papu\’  ‘; $str =‘my Name is “Papu” ‘; $str =‘my Name is ”Papu” ‘; No need of (\) Stick with one style
Cont’d ….. Remember if you put a variable  in between double quote it will replace by it’s value. In between single it the variable will be displayed.
String concatenation  We can join two strings using a (.) operator.
String comparison  We can compare two strings using <,>,<=,>=,==
 

More Related Content

PDF
Php, mysq lpart4(processing html form)
PPT
Class 6 - PHP Web Programming
PDF
PHP Loops and PHP Forms
PPTX
Loops PHP 04
PDF
PHP Basic & Variables
PPTX
Php Loop
PPTX
PHP Variables and scopes
PPTX
php basics
Php, mysq lpart4(processing html form)
Class 6 - PHP Web Programming
PHP Loops and PHP Forms
Loops PHP 04
PHP Basic & Variables
Php Loop
PHP Variables and scopes
php basics

What's hot (20)

PPTX
PHP tutorial | ptutorial
PDF
Introduction to PHP
PDF
Php workshop L03 superglobals
PPTX
Dev traning 2016 basics of PHP
PPT
Control Structures In Php 2
PPS
Web technology html5 php_mysql
PDF
Php workshop L04 database
PPT
PHP Tutorials
PPSX
PPTX
PPTX
Php Tutorial
PPT
PHP Workshop Notes
ODP
Php variables (english)
KEY
Using PHP
PDF
Php tutorial
PPTX
ODP
Sourcerer and Joomla! rev. 20130903
PPT
Php(report)
PHP tutorial | ptutorial
Introduction to PHP
Php workshop L03 superglobals
Dev traning 2016 basics of PHP
Control Structures In Php 2
Web technology html5 php_mysql
Php workshop L04 database
PHP Tutorials
Php Tutorial
PHP Workshop Notes
Php variables (english)
Using PHP
Php tutorial
Sourcerer and Joomla! rev. 20130903
Php(report)
Ad

Similar to Php, mysq lpart1 (20)

PDF
Learn php with PSK
PDF
Lecture14-Introduction to PHP-coding.pdf
PDF
Programming in PHP Course Material BCA 6th Semester
PPT
PHP-03-Functions.ppt
PPT
PHP-03-Functions.ppt
PPT
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
PPT
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
PPT
Php i basic chapter 3
PDF
Winter%200405%20-%20Beginning%20PHP
PDF
Winter%200405%20-%20Beginning%20PHP
PDF
Php tutorial(w3schools)
PDF
Php tutorialw3schools
PPT
Training on php by cyber security infotech (csi)
PPT
Php essentials
PDF
WT_PHP_PART1.pdf
PPTX
Php by shivitomer
PPTX
FYBSC IT Web Programming Unit IV PHP and MySQL
PDF
Php a dynamic web scripting language
PPTX
basics of php
PDF
&lt;img src="../i/r_14.png" />
Learn php with PSK
Lecture14-Introduction to PHP-coding.pdf
Programming in PHP Course Material BCA 6th Semester
PHP-03-Functions.ppt
PHP-03-Functions.ppt
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
Winter%200405%20-%20Beginning%20PHP
Winter%200405%20-%20Beginning%20PHP
Php tutorial(w3schools)
Php tutorialw3schools
Training on php by cyber security infotech (csi)
Php essentials
WT_PHP_PART1.pdf
Php by shivitomer
FYBSC IT Web Programming Unit IV PHP and MySQL
Php a dynamic web scripting language
basics of php
&lt;img src="../i/r_14.png" />
Ad

More from Subhasis Nayak (19)

PDF
Php, mysq lpart5(mysql)
PDF
working with database using mysql
PDF
Php, mysq lpart3
PPT
PPT
Jsp 02(jsp directives)2003
PPT
Php, mysqlpart2
PPTX
C:\fakepath\jsp01
PPTX
Servlet & jsp
PPT
J2ee connector architecture
PPT
how to create object
PDF
Pointer in c++ part3
PDF
Pointer in c++ part2
PDF
Pointer in c++ part1
PDF
C++ arrays part2
ODP
C++ arrays part1
PDF
Introduction to network
PDF
Flow control in c++
PPT
Oops And C++ Fundamentals
PPT
Text mode Linux Installation Part 01
Php, mysq lpart5(mysql)
working with database using mysql
Php, mysq lpart3
Jsp 02(jsp directives)2003
Php, mysqlpart2
C:\fakepath\jsp01
Servlet & jsp
J2ee connector architecture
how to create object
Pointer in c++ part3
Pointer in c++ part2
Pointer in c++ part1
C++ arrays part2
C++ arrays part1
Introduction to network
Flow control in c++
Oops And C++ Fundamentals
Text mode Linux Installation Part 01

Recently uploaded (20)

PPTX
Cell Structure & Organelles in detailed.
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
01-Introduction-to-Information-Management.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Classroom Observation Tools for Teachers
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Microbial diseases, their pathogenesis and prophylaxis
Cell Structure & Organelles in detailed.
VCE English Exam - Section C Student Revision Booklet
human mycosis Human fungal infections are called human mycosis..pptx
GDM (1) (1).pptx small presentation for students
01-Introduction-to-Information-Management.pdf
O7-L3 Supply Chain Operations - ICLT Program
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
O5-L3 Freight Transport Ops (International) V1.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Final Presentation General Medicine 03-08-2024.pptx
Final Presentation General Medicine 03-08-2024.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Classroom Observation Tools for Teachers
Microbial disease of the cardiovascular and lymphatic systems
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Abdominal Access Techniques with Prof. Dr. R K Mishra
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Microbial diseases, their pathogenesis and prophylaxis

Php, mysq lpart1

  • 1. SUBHASIS NAYAK CMC PHP, MYSQL
  • 2. What we will discuss ? Here we will discuss what PHP is all about? PHP MySql Apache installation PHP basics. Variables & data types Flow controls Functions
  • 3. What php is all about? PHP is hugely popular, and mostly used programming language for website’s backend process. IT is a programming language that was designed for making dynamic websites. he name PHP is a recursive acronym that stands for PHP: Hypertext Preprocessor. Hi! I am not with time to describe more about PHP. So go the site http://php.net and check it out.
  • 4. Continue ….. The PHP language is flexible and easy to learn quickly even if you have not done any programming in the past. If you have done any programming language like c, c++, java then you can learn PHP in one night.
  • 5. Installing AMP It has three steps Installing Apache – it is very simple step by step. Installing php – extract your php compressed package. Set the environment path. To ‘conf ‘ folder of apache=>open httpd.conf and enable all belows LoadModule php5_module “///” AddType application/x-httpd-php.php AddTypeapplication/x-httpd-php-source.phps Installing Mysql. Doing configuration
  • 6. Configure PHP To configure php go to “php.ini” Search for “register_global” check it for if not change it to off. Search for “error_reporting and display errors”. When we are writing your code enable it by doing “E_ALL”. After production disable it by doing “E_NONE” Change the session data to store in a particular folder to do so. “session.save_path=c:/windows/temp” The default execution time is 3o seconds. It is not possible for some scripts to complete execution within 30 secs .you can change to 10 to 15 minutes. Put the value like this “max_executin time = 900” Save your “php.ini” & restart ur apache to get the effect.
  • 7. Basic architecture Browser Data base Middle Ware(PHP,JSP. ASP) Web server(Apache/IIS)
  • 8. Variables All variables start with ‘$’. Variable starts with alpha numeric. Stay away from using underscore from at start of variable. Variable can contain alpha numeric. Good practice of writing variable $name $var1 $var_Name $varName
  • 9. Working with numbers You can do all mathematical operation like this?
  • 10. Strings String is a collection of characters treated as single entity. In PHP we put a string using: Within two double quotes = “” Within two single quotes = ‘’ $myString = “Welcome to Open Source”; $myString = ‘Welcome to Open Source’;
  • 11. Bypassing the special characters Some times we need to work with special characters which is used by the php. Even some special characters are there for Mysql. Some times we want to by pass the characters. We have to by pass the double quote in between double quote. We have to by pass the Single quote in between single quote. To do that we need to use (\) back slash before the characters.
  • 12. Cont’d ….. $str =“my Name is “Papu” ”; $str =“my Name is \“Papu\” ”; $str =‘my Name is ‘Papu’ ‘; $str =‘my Name is \’Papu\’ ‘; $str =‘my Name is “Papu” ‘; $str =‘my Name is ”Papu” ‘; No need of (\) Stick with one style
  • 13. Cont’d ….. Remember if you put a variable in between double quote it will replace by it’s value. In between single it the variable will be displayed.
  • 14. String concatenation We can join two strings using a (.) operator.
  • 15. String comparison We can compare two strings using <,>,<=,>=,==
  • 16.