SlideShare a Scribd company logo
5
Most read
7
Most read
9
Most read
WEB TECHNOLOGIES-
PHP Programming
Dr R Jegadeesan Prof-CSE
Jyothishmathi Institute of Technology and Science,
karimnagar
Syllabus
PHP Programming
Introduction to PHP: Declaring variables, data
types, arrays, strings, operators, expressions,
control structures, functions, Reading data from
web form controls like text boxes, radio buttons,
lists etc., Handling File Uploads, Connecting to
database (MySQL as reference), executing simple
queries, handling results, Handling sessions and
cookies File Handling in PHP: File operations like
opening, closing, reading, writing, appending,
deleting etc. on text and binary files, listing
directories
2
UNIT 1 : PHP Programming
Aim & Objective :
āž¢ To introduce PHP language for Server Side scripting.
āž¢ PHP file upload features allows you to upload binary and text files both.
Moreover, you can have the full control over the file to be uploaded
through PHP authentication and file operation functions.
PHP File Uploads
3
UNIT 1 : PHP Programming
Principles of File Upload:
āž¢ PHP allows you to upload single and multiple files through few lines of
code only.
āž¢PHP file upload facilities allows you to upload both type of files : binary and
text files. Moreover, you can have the full control over the file to be uploaded
through PHP authentication and file operation functions.
PHP File Uploads
4
UNIT 1 : PHP Programming
PHP $_FILES
āž¢ The PHP global $_FILES contains all the information of file.
āž¢ $_FILES contains 5 elements. Each elements first dimension is name of the
upload control.
āž¢ By the help of $_ FILES global, we can get file name, file type, file size, temp
file name and errors associated with file.
PHP File Uploads
5
UNIT 1 : PHP Programming
PHP File Uploads
6
UNIT 1 : PHP Programming
Elements of $_FILES
we are assuming that file name is jits.
$_FILES[ā€˜jits']['name']
returns file name.
$_FILES[ā€˜jits’]['type']
returns MIME type of the file. Ex: application /pdf, image/jpg
$_FILES[ā€˜jits']['size']
returns size of the file (in bytes).
$_FILES[ā€˜jits']['tmp_name']
returns temporary file name of the file which was stored on the server.
$_FILES[ā€˜jits']['error']
returns error code associated with this file.
PHP File Uploads
7
UNIT 1 : PHP Programming
is_uploaded_file() Function
āž¢By using this function, we can check whether the file is uploaded from client system to
server temporary location or not.
move_uploaded_file() function
āž¢The move_uploaded_file() function moves the uploaded file to a new location.
āž¢The move_uploaded_file() function checks internally if the file is uploaded through the
POST request. It moves the file if it is uploaded through the POST request.
PHP File Uploads
8
UNIT 1 : PHP Programming
Example :File Uploading
<html>
<body>
<form action="server_uploaded.php" method="POST" enctype= "multipart/form-data">
<input type="file" name="myfile" />
<input type="submit" value="Upload" />
</form>
</body>
</html>
PHP File Uploads
9
UNIT 1 : PHP Programming
<?php
if(is_uploaded_file($_FILES['myfile']['tmp_name']))
{
$fname=$_FILES['myfile']['name'];
if(move_uploaded_file($_FILES['myfile']['tmp_name'],"myfolder/$fname"))
{
echo "<b>$fname file is sucessfully uploaded <br><br>";
echo "Name of the Uploaded file is ". $_FILES['myfile']['name']. "<br>";
echo "Size of the file is :". $_FILES['myfile']['size']."<br>";
echo "tmp name of the file is :". $_FILES['myfile']['tmp_name']."<br>";
echo "Type of the file is :". $_FILES['myfile']['type'];
}
else
echo "file is not uploaded";
}
else
echo "not";
?>
PHP File Uploads
10
UNIT 1 : PHP Programming
PHP configuration init files
11
UNIT 1 : PHP Programming
PHP Configurations
12
UNIT 1 : PHP Programming
How PHP works
13
UNIT 1 : PHP Programming
PHP code
14
UNIT 1 : PHP Programming
PHP Text & Reference Books
15
Book Details :
TEXT BOOKS:
1. Web Technologies, Uttam K Roy, Oxford University Press
2. The Complete Reference PHP – Steven Holzner, Tata McGraw-Hill
REFERENCE BOOKS:
1.Web Programming, building internet applications, Chris Bates 2nd edition, Wiley Dreamtech
2. Java Server Pages –Hans Bergsten, SPD O’Reilly
3. Java Script, D. Flanagan, O’Reilly,SPD.
4. Beginning Web Programming-Jon Duckett WROX.
5. Programming World Wide Web, R. W. Sebesta, Fourth Edition, Pearson.
6. Internet and World Wide Web – How to program, Dietel and Nieto, Pearson.
UNIT 1 : PHP Programming
PHP Video reference
16
Video Link details (NPTEL, YOUTUBE Lectures and etc.)
https://nptel.ac.in/courses/106105084/
https://freevideolectures.com/course/3140/internet-technologies
https://www.btechguru.com/GATE--computer-science-and-engineering--web-technologies-
video-lecture--22--132.html
UNIT 1 : PHP Programming
PHP courses
17
courses available on <www.coursera.org>, and http://neat.aicte-india.org
https://www.coursera.org/
Course 1 : Web Applications for Everybody Specialization
Build dynamic database-backed web sites.. Use PHP, MySQL, jQuery, and Handlebars to build web
and database applications.
Course 2: Web Design for Everybody: Basics of Web Development & Coding Specialization
Learn to Design and Create Websites. Build a responsive and accessible web portfolio using
HTML5, CSS3, and JavaScript
UNIT 1 : PHP Programming
PHP Tutorials
18
Tutorial topic wise
āž¢https://www.w3schools.com/PHP/DEfaULT.asP
āž¢https://www.phptpoint.com/php-tutorial/
āž¢https://www.tutorialspoint.com/php/index.htm
UNIT 1 : PHP Programming
PHP MCQs
19
PHP – MCQs
1. What does PHP stand for?
i) Personal Home Page ii) Hypertext Preprocessor
iii) Pretext Hypertext Processor iv) Preprocessor Home Page
A. Both (i) and (ii) B. Both (ii) and (iv) C. Only (ii) D. Both (i) and (iii)
2. PHP files have a default file extension of.
A. .html B. .xml C. .php D. .ph
3. A PHP script should start with ---- and end with----:
A. < php > B. < ? php ?> C. < ? ? > D. < ?php ? >
4. Which of the looping statements is/are supported by PHP?
i) for loop ii) while loop iii) do-while loop iv) foreach loop
A. (i) and (ii) B. (i), (ii) and (iii)
C. All of the mentioned
D. None of the mentioned
UNIT 1 : PHP Programming
PHP Tutorial
20
PHP –Tutorial Problems:
1.Write a php program to read employee details
2.Write aphp program to uploads files to remote directory
UNIT 1 : PHP Programming
PHP Questions
21
PHP –universities & Important Questions:
1.What are the different types of errors in PHP?
2.What is the functionality of the function strstr and stristr?
3. Explain about various data types in PHP.
4. Explain about Arrays in PHP.
5. List and Explain the string functions in PHP.
6. List the statements that are used to connect PHP with MySQL.
7.How PHP is different from PHP Script? Explain.
8. Explain PHP form processing with an example.
9.How can I retrieve values from one database server and store them in other database server
using PHP?
10. What are the differences between Get and post methods in form submitting. Give the case
where we can use get and we can use post methods?
Thank you
22

More Related Content

PPT
Php mysql ppt
Karmatechnologies Pvt. Ltd.
Ā 
PPTX
Form Handling using PHP
Nisa Soomro
Ā 
PPTX
Flask – Python
Max Claus Nunes
Ā 
PPTX
Javascript alert and confrim box
Jesus Obenita Jr.
Ā 
PPT
PHP - Introduction to File Handling with PHP
Vibrant Technologies & Computers
Ā 
PPTX
Java script errors &amp; exceptions handling
AbhishekMondal42
Ā 
PPSX
Php and MySQL
Tiji Thomas
Ā 
PPTX
Method overloading
Lovely Professional University
Ā 
Form Handling using PHP
Nisa Soomro
Ā 
Flask – Python
Max Claus Nunes
Ā 
Javascript alert and confrim box
Jesus Obenita Jr.
Ā 
PHP - Introduction to File Handling with PHP
Vibrant Technologies & Computers
Ā 
Java script errors &amp; exceptions handling
AbhishekMondal42
Ā 
Php and MySQL
Tiji Thomas
Ā 
Method overloading
Lovely Professional University
Ā 

What's hot (20)

PPTX
php
ajeetjhajharia
Ā 
PPT
Oops concepts in php
CPD INDIA
Ā 
PPT
Js ppt
Rakhi Thota
Ā 
PDF
Php introduction
krishnapriya Tadepalli
Ā 
PPT
Jsp ppt
Vikas Jagtap
Ā 
PPTX
OOP Introduction with java programming language
Md.Al-imran Roton
Ā 
PPTX
Php
Shyam Khant
Ā 
PPTX
Php string function
Ravi Bhadauria
Ā 
PPTX
Lab #2: Introduction to Javascript
Walid Ashraf
Ā 
PPTX
FYBSC IT Web Programming Unit IV PHP and MySQL
Arti Parab Academics
Ā 
PPTX
Java abstract class & abstract methods
Shubham Dwivedi
Ā 
PDF
Web Development Course: PHP lecture 1
Gheyath M. Othman
Ā 
PDF
Python programming : Files
Emertxe Information Technologies Pvt Ltd
Ā 
PPTX
Flask
Mamta Kumari
Ā 
PPT
Html forms
M Vishnuvardhan Reddy
Ā 
PPTX
Servlets
ZainabNoorGul
Ā 
PPT
Php with MYSQL Database
Computer Hardware & Trouble shooting
Ā 
PPT
PL/SQL Introduction and Concepts
Bharat Kalia
Ā 
PPTX
Files in php
sana mateen
Ā 
Oops concepts in php
CPD INDIA
Ā 
Js ppt
Rakhi Thota
Ā 
Php introduction
krishnapriya Tadepalli
Ā 
Jsp ppt
Vikas Jagtap
Ā 
OOP Introduction with java programming language
Md.Al-imran Roton
Ā 
Php string function
Ravi Bhadauria
Ā 
Lab #2: Introduction to Javascript
Walid Ashraf
Ā 
FYBSC IT Web Programming Unit IV PHP and MySQL
Arti Parab Academics
Ā 
Java abstract class & abstract methods
Shubham Dwivedi
Ā 
Web Development Course: PHP lecture 1
Gheyath M. Othman
Ā 
Python programming : Files
Emertxe Information Technologies Pvt Ltd
Ā 
Flask
Mamta Kumari
Ā 
Html forms
M Vishnuvardhan Reddy
Ā 
Servlets
ZainabNoorGul
Ā 
Php with MYSQL Database
Computer Hardware & Trouble shooting
Ā 
PL/SQL Introduction and Concepts
Bharat Kalia
Ā 
Files in php
sana mateen
Ā 
Ad

Similar to WEB TECHNOLOGIES- PHP Programming (20)

PPTX
php Chapter 1.pptx
HambaAbebe2
Ā 
PPT
PHP
sometech
Ā 
PPTX
Php Unit 1
team11vgnt
Ā 
PDF
Introduction of PHP.pdf
karinaabyys
Ā 
PPTX
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
DRambabu3
Ā 
PPT
Intro to PHP for Students and professionals
cuyak
Ā 
PPT
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
Ā 
PDF
Introduction to PHP - Basics of PHP
wahidullah mudaser
Ā 
PDF
WT_PHP_PART1.pdf
HambardeAtharva
Ā 
PDF
Introduction to php
Anjan Banda
Ā 
PDF
Php Interview Questions
UmeshSingh159
Ā 
PPT
Php mysql
Ajit Yadav
Ā 
PPSX
PHP Comprehensive Overview
Mohamed Loey
Ā 
PPTX
PHP ITCS 323
Sleepy Head
Ā 
PPT
Basics PHP
Alokin Software Pvt Ltd
Ā 
PPTX
php.pptx
nusky ahamed
Ā 
PPT
10_introduction_php.ppt
MercyL2
Ā 
PPT
introduction_php.ppt
ArunKumar313658
Ā 
PPTX
INTRODUCTION to php.pptx
priyanshupanchal8
Ā 
PPT
Introduction to web and php mysql
Programmer Blog
Ā 
php Chapter 1.pptx
HambaAbebe2
Ā 
PHP
sometech
Ā 
Php Unit 1
team11vgnt
Ā 
Introduction of PHP.pdf
karinaabyys
Ā 
Unit 5-PHP Declaring variables, data types, array, string, operators, Expres...
DRambabu3
Ā 
Intro to PHP for Students and professionals
cuyak
Ā 
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
Ā 
Introduction to PHP - Basics of PHP
wahidullah mudaser
Ā 
WT_PHP_PART1.pdf
HambardeAtharva
Ā 
Introduction to php
Anjan Banda
Ā 
Php Interview Questions
UmeshSingh159
Ā 
Php mysql
Ajit Yadav
Ā 
PHP Comprehensive Overview
Mohamed Loey
Ā 
PHP ITCS 323
Sleepy Head
Ā 
php.pptx
nusky ahamed
Ā 
10_introduction_php.ppt
MercyL2
Ā 
introduction_php.ppt
ArunKumar313658
Ā 
INTRODUCTION to php.pptx
priyanshupanchal8
Ā 
Introduction to web and php mysql
Programmer Blog
Ā 
Ad

More from Jyothishmathi Institute of Technology and Science Karimnagar (20)

PDF
JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
JAVA PROGRAMMING - The Collections Framework
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
JAVA PROGRAMMING- Exception handling - Multithreading
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
JAVA PROGRAMMING – Packages - Stream based I/O
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
Java programming -Object-Oriented Thinking- Inheritance
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
Compiler Design- Machine Independent Optimizations
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
COMPILER DESIGN Run-Time Environments
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
COMPILER DESIGN- Syntax Directed Translation
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
COMPILER DESIGN- Introduction & Lexical Analysis:
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PPTX
CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
CRYPTOGRAPHY & NETWOK SECURITY- Symmetric key Ciphers
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
PDF
Computer Forensics Working with Windows and DOS Systems
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
JAVA PROGRAMMING- GUI Programming with Swing - The Swing Buttons
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
JAVA PROGRAMMING - The Collections Framework
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
JAVA PROGRAMMING- Exception handling - Multithreading
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
JAVA PROGRAMMING – Packages - Stream based I/O
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
Java programming -Object-Oriented Thinking- Inheritance
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
Compiler Design- Machine Independent Optimizations
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
COMPILER DESIGN Run-Time Environments
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
COMPILER DESIGN- Syntax Directed Translation
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
COMPILER DESIGN- Introduction & Lexical Analysis:
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
CRYPTOGRAPHY AND NETWORK SECURITY- E-Mail Security
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
CRYPTOGRAPHY AND NETWORK SECURITY- Transport-level Security
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
CRYPTOGRAPHY & NETWOK SECURITY- Symmetric key Ciphers
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 
Computer Forensics Working with Windows and DOS Systems
Jyothishmathi Institute of Technology and Science Karimnagar
Ā 

Recently uploaded (20)

PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
Ā 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
Ā 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
Ā 
PPTX
Coupa-Overview _Assumptions presentation
annapureddyn
Ā 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
Ā 
PDF
Doc9.....................................
SofiaCollazos
Ā 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
Ā 
PDF
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
Ā 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
Ā 
PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
Ā 
PPTX
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
Ā 
PDF
Software Development Company | KodekX
KodekX
Ā 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
Ā 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
Ā 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
Ā 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
Ā 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
Ā 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
Ā 
PPTX
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
Ā 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
Ā 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
Ā 
Brief History of Internet - Early Days of Internet
sutharharshit158
Ā 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
Ā 
Coupa-Overview _Assumptions presentation
annapureddyn
Ā 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
Ā 
Doc9.....................................
SofiaCollazos
Ā 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
Ā 
Advances in Ultra High Voltage (UHV) Transmission and Distribution Systems.pdf
Nabajyoti Banik
Ā 
REPORT: Heating appliances market in Poland 2024
SPIUG
Ā 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
Ā 
The-Ethical-Hackers-Imperative-Safeguarding-the-Digital-Frontier.pptx
sujalchauhan1305
Ā 
Software Development Company | KodekX
KodekX
Ā 
cloud computing vai.pptx for the project
vaibhavdobariyal79
Ā 
Presentation about Hardware and Software in Computer
snehamodhawadiya
Ā 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
Ā 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
Ā 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
Ā 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
Ā 
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
Ā 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
Ā 

WEB TECHNOLOGIES- PHP Programming

  • 1. WEB TECHNOLOGIES- PHP Programming Dr R Jegadeesan Prof-CSE Jyothishmathi Institute of Technology and Science, karimnagar
  • 2. Syllabus PHP Programming Introduction to PHP: Declaring variables, data types, arrays, strings, operators, expressions, control structures, functions, Reading data from web form controls like text boxes, radio buttons, lists etc., Handling File Uploads, Connecting to database (MySQL as reference), executing simple queries, handling results, Handling sessions and cookies File Handling in PHP: File operations like opening, closing, reading, writing, appending, deleting etc. on text and binary files, listing directories 2
  • 3. UNIT 1 : PHP Programming Aim & Objective : āž¢ To introduce PHP language for Server Side scripting. āž¢ PHP file upload features allows you to upload binary and text files both. Moreover, you can have the full control over the file to be uploaded through PHP authentication and file operation functions. PHP File Uploads 3
  • 4. UNIT 1 : PHP Programming Principles of File Upload: āž¢ PHP allows you to upload single and multiple files through few lines of code only. āž¢PHP file upload facilities allows you to upload both type of files : binary and text files. Moreover, you can have the full control over the file to be uploaded through PHP authentication and file operation functions. PHP File Uploads 4
  • 5. UNIT 1 : PHP Programming PHP $_FILES āž¢ The PHP global $_FILES contains all the information of file. āž¢ $_FILES contains 5 elements. Each elements first dimension is name of the upload control. āž¢ By the help of $_ FILES global, we can get file name, file type, file size, temp file name and errors associated with file. PHP File Uploads 5
  • 6. UNIT 1 : PHP Programming PHP File Uploads 6
  • 7. UNIT 1 : PHP Programming Elements of $_FILES we are assuming that file name is jits. $_FILES[ā€˜jits']['name'] returns file name. $_FILES[ā€˜jits’]['type'] returns MIME type of the file. Ex: application /pdf, image/jpg $_FILES[ā€˜jits']['size'] returns size of the file (in bytes). $_FILES[ā€˜jits']['tmp_name'] returns temporary file name of the file which was stored on the server. $_FILES[ā€˜jits']['error'] returns error code associated with this file. PHP File Uploads 7
  • 8. UNIT 1 : PHP Programming is_uploaded_file() Function āž¢By using this function, we can check whether the file is uploaded from client system to server temporary location or not. move_uploaded_file() function āž¢The move_uploaded_file() function moves the uploaded file to a new location. āž¢The move_uploaded_file() function checks internally if the file is uploaded through the POST request. It moves the file if it is uploaded through the POST request. PHP File Uploads 8
  • 9. UNIT 1 : PHP Programming Example :File Uploading <html> <body> <form action="server_uploaded.php" method="POST" enctype= "multipart/form-data"> <input type="file" name="myfile" /> <input type="submit" value="Upload" /> </form> </body> </html> PHP File Uploads 9
  • 10. UNIT 1 : PHP Programming <?php if(is_uploaded_file($_FILES['myfile']['tmp_name'])) { $fname=$_FILES['myfile']['name']; if(move_uploaded_file($_FILES['myfile']['tmp_name'],"myfolder/$fname")) { echo "<b>$fname file is sucessfully uploaded <br><br>"; echo "Name of the Uploaded file is ". $_FILES['myfile']['name']. "<br>"; echo "Size of the file is :". $_FILES['myfile']['size']."<br>"; echo "tmp name of the file is :". $_FILES['myfile']['tmp_name']."<br>"; echo "Type of the file is :". $_FILES['myfile']['type']; } else echo "file is not uploaded"; } else echo "not"; ?> PHP File Uploads 10
  • 11. UNIT 1 : PHP Programming PHP configuration init files 11
  • 12. UNIT 1 : PHP Programming PHP Configurations 12
  • 13. UNIT 1 : PHP Programming How PHP works 13
  • 14. UNIT 1 : PHP Programming PHP code 14
  • 15. UNIT 1 : PHP Programming PHP Text & Reference Books 15 Book Details : TEXT BOOKS: 1. Web Technologies, Uttam K Roy, Oxford University Press 2. The Complete Reference PHP – Steven Holzner, Tata McGraw-Hill REFERENCE BOOKS: 1.Web Programming, building internet applications, Chris Bates 2nd edition, Wiley Dreamtech 2. Java Server Pages –Hans Bergsten, SPD O’Reilly 3. Java Script, D. Flanagan, O’Reilly,SPD. 4. Beginning Web Programming-Jon Duckett WROX. 5. Programming World Wide Web, R. W. Sebesta, Fourth Edition, Pearson. 6. Internet and World Wide Web – How to program, Dietel and Nieto, Pearson.
  • 16. UNIT 1 : PHP Programming PHP Video reference 16 Video Link details (NPTEL, YOUTUBE Lectures and etc.) https://nptel.ac.in/courses/106105084/ https://freevideolectures.com/course/3140/internet-technologies https://www.btechguru.com/GATE--computer-science-and-engineering--web-technologies- video-lecture--22--132.html
  • 17. UNIT 1 : PHP Programming PHP courses 17 courses available on <www.coursera.org>, and http://neat.aicte-india.org https://www.coursera.org/ Course 1 : Web Applications for Everybody Specialization Build dynamic database-backed web sites.. Use PHP, MySQL, jQuery, and Handlebars to build web and database applications. Course 2: Web Design for Everybody: Basics of Web Development & Coding Specialization Learn to Design and Create Websites. Build a responsive and accessible web portfolio using HTML5, CSS3, and JavaScript
  • 18. UNIT 1 : PHP Programming PHP Tutorials 18 Tutorial topic wise āž¢https://www.w3schools.com/PHP/DEfaULT.asP āž¢https://www.phptpoint.com/php-tutorial/ āž¢https://www.tutorialspoint.com/php/index.htm
  • 19. UNIT 1 : PHP Programming PHP MCQs 19 PHP – MCQs 1. What does PHP stand for? i) Personal Home Page ii) Hypertext Preprocessor iii) Pretext Hypertext Processor iv) Preprocessor Home Page A. Both (i) and (ii) B. Both (ii) and (iv) C. Only (ii) D. Both (i) and (iii) 2. PHP files have a default file extension of. A. .html B. .xml C. .php D. .ph 3. A PHP script should start with ---- and end with----: A. < php > B. < ? php ?> C. < ? ? > D. < ?php ? > 4. Which of the looping statements is/are supported by PHP? i) for loop ii) while loop iii) do-while loop iv) foreach loop A. (i) and (ii) B. (i), (ii) and (iii) C. All of the mentioned D. None of the mentioned
  • 20. UNIT 1 : PHP Programming PHP Tutorial 20 PHP –Tutorial Problems: 1.Write a php program to read employee details 2.Write aphp program to uploads files to remote directory
  • 21. UNIT 1 : PHP Programming PHP Questions 21 PHP –universities & Important Questions: 1.What are the different types of errors in PHP? 2.What is the functionality of the function strstr and stristr? 3. Explain about various data types in PHP. 4. Explain about Arrays in PHP. 5. List and Explain the string functions in PHP. 6. List the statements that are used to connect PHP with MySQL. 7.How PHP is different from PHP Script? Explain. 8. Explain PHP form processing with an example. 9.How can I retrieve values from one database server and store them in other database server using PHP? 10. What are the differences between Get and post methods in form submitting. Give the case where we can use get and we can use post methods?