SlideShare ist ein Scribd-Unternehmen logo
1 von 14
BY
M.LAVANYA,M.SC(CS)
NADAR SARASWATHI COLLEGE
OF ARTS AND SCIENCE ,THENI.
 PHP == ‘HYPERTEXT PREPROCESSOR’
 open-source, server-side scripting language
 Used to generate dynamic web-pages
 PHP scripts reside between reserved PHP tags
• This allows the programmer to embed PHP scripts within HTML
pages
 Interpreted language, scripts are parsed at run-time
rather than compiled beforehand
 Executed on the server-side
 Source-code not visible by client
• ‘view source’ in browsers does not display the PHP code
 Various built-in functions allow for fast development
 Compatible with many popular databases
 PHP is a general-purpose server-side scripting language
originally designed for web development to produce
dynamic web pages .
 PHP can interact with My SQL databases.
 Structurally similar to C/C++
 Support procedural and object-oriented paradigm (to
some degree)
 All PHP statements end with a semi-colon
 Each PHP script must be enclosed in the reserved PHP
tag
<?php
……
?>
 Standard C, C++, and shell comment symbols.
//C++ and java-style comment
# shell-style comments
/* C-style comments
These can span multiple lines*/
 PHP variables must begin with a “$” sign.
 Case-sensitive
 Global and locally-scoped variables.
• global variables can be used anywhere
• local variables restricted to a function or class
 Certain variable names reserved by PHP
• form variables ($_POST, $_GET)
• server variables($_ SERVER)
 Etc.
• MySQL is a database system used on the web
• MySQL is a database system that runs on a server
• MySQL is ideal for both small and large applications
• MySQL is very fast, reliable, and easy to use
• MySQL uses standard SQL
• MySQL compiles on a number of platforms
• MySQL is free to download and use
• MySQL is developed, distributed, and supported by
Oracle Corporation
• MySQL is named after co-founder Monty Widenius's
daughter: My
• The data in a MySQL database are stored in tables. A
table is a collection of related data, and it consists of
columns and rows.
• Databases are useful for storing information categorically.
A company may have a database with the following
tables:
• Employees
• Products
• Customers
• Orders
• PHP combined with MySQL are cross-platform (you can
develop in Windows and serve on a Unix platform)
• A query is a question or a request.
• We can query a database for specific information and
have a record set returned.
• Look at the following query (using standard SQL):
SELECT LastName FROM Employees
• The query above selects all the data in the "LastName"
column from the "Employees" table.
 PHP 5 and later can work with a MySQL database using:
• MySQLi extension (the "i" stands for improved)
• PDO (PHP Data Objects)
 Earlier versions of PHP used the MySQL extension.
However, this extension was deprecated in 2012.
• The CREATE DATABASE statement is used to create a
database in MySQL.
• The following examples create a database named
"myDB":
Example (MySQLi Object-oriented)
<?php
$servername = "localhost";
$username = "username";
$password = "password";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Create database
$sql = "CREATE DATABASE myDB";
if ($conn->query($sql) === TRUE) {
echo "Database created successfully";
} else {
echo "Error creating database: " . $conn->error;
}
$conn->close();
?>

Weitere ähnliche Inhalte

Was ist angesagt?

Drupal module development
Drupal module developmentDrupal module development
Drupal module development
Rachit Gupta
 
Drupal Introduction
Drupal IntroductionDrupal Introduction
Drupal Introduction
Frobben
 
Introducing Joomla! CMS
Introducing Joomla! CMSIntroducing Joomla! CMS
Introducing Joomla! CMS
Kandarp Vyas
 
OW2 Exo Platform Open Social Portal Linuxtag09
OW2 Exo Platform Open Social Portal Linuxtag09OW2 Exo Platform Open Social Portal Linuxtag09
OW2 Exo Platform Open Social Portal Linuxtag09
Catherine Nuel
 
Web Application Solutions
Web Application SolutionsWeb Application Solutions
Web Application Solutions
marvin256
 
Midterm presentation
Midterm presentationMidterm presentation
Midterm presentation
dsmo223
 

Was ist angesagt? (20)

The Importance Things of Full Stack Development
The Importance Things of Full Stack DevelopmentThe Importance Things of Full Stack Development
The Importance Things of Full Stack Development
 
Drupal module development
Drupal module developmentDrupal module development
Drupal module development
 
You Can Be an Open Source Library
You Can Be an Open Source LibraryYou Can Be an Open Source Library
You Can Be an Open Source Library
 
Class 10
Class 10Class 10
Class 10
 
Drupal Introduction
Drupal IntroductionDrupal Introduction
Drupal Introduction
 
Intro to Drupal Module Developement
Intro to Drupal Module DevelopementIntro to Drupal Module Developement
Intro to Drupal Module Developement
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Introducing Joomla! CMS
Introducing Joomla! CMSIntroducing Joomla! CMS
Introducing Joomla! CMS
 
Lesson 4
Lesson 4Lesson 4
Lesson 4
 
Open source wordpress and drupal
Open source wordpress and drupalOpen source wordpress and drupal
Open source wordpress and drupal
 
Web programming technologies
Web programming technologiesWeb programming technologies
Web programming technologies
 
6acfbd164b5fb1607d886eaa50548962 fswd-big_picture
 6acfbd164b5fb1607d886eaa50548962 fswd-big_picture 6acfbd164b5fb1607d886eaa50548962 fswd-big_picture
6acfbd164b5fb1607d886eaa50548962 fswd-big_picture
 
Blind xss
Blind xssBlind xss
Blind xss
 
Project First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be usedProject First presentation about introduction to technologies to be used
Project First presentation about introduction to technologies to be used
 
Benefit of Web Application Development with Zend Framework
Benefit of Web Application Development with Zend FrameworkBenefit of Web Application Development with Zend Framework
Benefit of Web Application Development with Zend Framework
 
Web Designing
Web DesigningWeb Designing
Web Designing
 
OW2 Exo Platform Open Social Portal Linuxtag09
OW2 Exo Platform Open Social Portal Linuxtag09OW2 Exo Platform Open Social Portal Linuxtag09
OW2 Exo Platform Open Social Portal Linuxtag09
 
]po[ Sencha File-Storage Specs
]po[ Sencha File-Storage Specs]po[ Sencha File-Storage Specs
]po[ Sencha File-Storage Specs
 
Web Application Solutions
Web Application SolutionsWeb Application Solutions
Web Application Solutions
 
Midterm presentation
Midterm presentationMidterm presentation
Midterm presentation
 

Ähnlich wie Web programming

06.m3 cms set-upwebserver
06.m3 cms set-upwebserver06.m3 cms set-upwebserver
06.m3 cms set-upwebserver
tarensi
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
Jeanho Chu
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
ADARSH BHATT
 
Lecture1 introduction by okello erick
Lecture1 introduction by okello erickLecture1 introduction by okello erick
Lecture1 introduction by okello erick
okelloerick
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
litbbsr
 

Ähnlich wie Web programming (20)

Php reports sumit
Php reports sumitPhp reports sumit
Php reports sumit
 
06.m3 cms set-upwebserver
06.m3 cms set-upwebserver06.m3 cms set-upwebserver
06.m3 cms set-upwebserver
 
Introduction to webprogramming using PHP and MySQL
Introduction to webprogramming using PHP and MySQLIntroduction to webprogramming using PHP and MySQL
Introduction to webprogramming using PHP and MySQL
 
Lamp
LampLamp
Lamp
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
Week01 jan19 introductionto_php
Week01 jan19 introductionto_phpWeek01 jan19 introductionto_php
Week01 jan19 introductionto_php
 
PHP MySQL Workshop - facehook
PHP MySQL Workshop - facehookPHP MySQL Workshop - facehook
PHP MySQL Workshop - facehook
 
Presentation 1 Web--dev
Presentation 1 Web--devPresentation 1 Web--dev
Presentation 1 Web--dev
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
After the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEANAfter the LAMP, it's time to get MEAN
After the LAMP, it's time to get MEAN
 
Learn PHP Lacture1
Learn PHP Lacture1Learn PHP Lacture1
Learn PHP Lacture1
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Lecture1 introduction by okello erick
Lecture1 introduction by okello erickLecture1 introduction by okello erick
Lecture1 introduction by okello erick
 
Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
 
Php training in bhubaneswar
Php training in bhubaneswar Php training in bhubaneswar
Php training in bhubaneswar
 
Php
PhpPhp
Php
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 

Mehr von Ishucs

Mehr von Ishucs (20)

Renuga
RenugaRenuga
Renuga
 
Snega
SnegaSnega
Snega
 
Thresholding
ThresholdingThresholding
Thresholding
 
Ishwariya
IshwariyaIshwariya
Ishwariya
 
Image compression
Image compressionImage compression
Image compression
 
Deepika
DeepikaDeepika
Deepika
 
Snega
SnegaSnega
Snega
 
Renuga
RenugaRenuga
Renuga
 
Soundharya
SoundharyaSoundharya
Soundharya
 
Lavanya
LavanyaLavanya
Lavanya
 
M.srinandhini
M.srinandhiniM.srinandhini
M.srinandhini
 
Deepika t
Deepika tDeepika t
Deepika t
 
Sragavi (1)
Sragavi (1)Sragavi (1)
Sragavi (1)
 
Ishwariya
IshwariyaIshwariya
Ishwariya
 
Software enginnering
Software enginneringSoftware enginnering
Software enginnering
 
Partial redundancy elimination
Partial redundancy eliminationPartial redundancy elimination
Partial redundancy elimination
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Big data
Big dataBig data
Big data
 
Affine array index
Affine array indexAffine array index
Affine array index
 
Business intelligence tools to handle big data
Business intelligence tools to handle big dataBusiness intelligence tools to handle big data
Business intelligence tools to handle big data
 

Kürzlich hochgeladen

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
dollysharma2066
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Christo Ananth
 

Kürzlich hochgeladen (20)

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELLPVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
PVC VS. FIBERGLASS (FRP) GRAVITY SEWER - UNI BELL
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 

Web programming

  • 2.  PHP == ‘HYPERTEXT PREPROCESSOR’  open-source, server-side scripting language  Used to generate dynamic web-pages  PHP scripts reside between reserved PHP tags • This allows the programmer to embed PHP scripts within HTML pages
  • 3.  Interpreted language, scripts are parsed at run-time rather than compiled beforehand  Executed on the server-side  Source-code not visible by client • ‘view source’ in browsers does not display the PHP code  Various built-in functions allow for fast development  Compatible with many popular databases
  • 4.  PHP is a general-purpose server-side scripting language originally designed for web development to produce dynamic web pages .  PHP can interact with My SQL databases.
  • 5.  Structurally similar to C/C++  Support procedural and object-oriented paradigm (to some degree)  All PHP statements end with a semi-colon  Each PHP script must be enclosed in the reserved PHP tag <?php …… ?>
  • 6.  Standard C, C++, and shell comment symbols. //C++ and java-style comment # shell-style comments /* C-style comments These can span multiple lines*/
  • 7.  PHP variables must begin with a “$” sign.  Case-sensitive  Global and locally-scoped variables. • global variables can be used anywhere • local variables restricted to a function or class  Certain variable names reserved by PHP • form variables ($_POST, $_GET) • server variables($_ SERVER)  Etc.
  • 8. • MySQL is a database system used on the web • MySQL is a database system that runs on a server • MySQL is ideal for both small and large applications • MySQL is very fast, reliable, and easy to use • MySQL uses standard SQL • MySQL compiles on a number of platforms • MySQL is free to download and use • MySQL is developed, distributed, and supported by Oracle Corporation • MySQL is named after co-founder Monty Widenius's daughter: My
  • 9. • The data in a MySQL database are stored in tables. A table is a collection of related data, and it consists of columns and rows. • Databases are useful for storing information categorically. A company may have a database with the following tables: • Employees • Products • Customers • Orders
  • 10. • PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform)
  • 11. • A query is a question or a request. • We can query a database for specific information and have a record set returned. • Look at the following query (using standard SQL): SELECT LastName FROM Employees • The query above selects all the data in the "LastName" column from the "Employees" table.
  • 12.  PHP 5 and later can work with a MySQL database using: • MySQLi extension (the "i" stands for improved) • PDO (PHP Data Objects)  Earlier versions of PHP used the MySQL extension. However, this extension was deprecated in 2012.
  • 13. • The CREATE DATABASE statement is used to create a database in MySQL. • The following examples create a database named "myDB":
  • 14. Example (MySQLi Object-oriented) <?php $servername = "localhost"; $username = "username"; $password = "password"; // Create connection $conn = new mysqli($servername, $username, $password); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } // Create database $sql = "CREATE DATABASE myDB"; if ($conn->query($sql) === TRUE) { echo "Database created successfully"; } else { echo "Error creating database: " . $conn->error; } $conn->close(); ?>