SlideShare ist ein Scribd-Unternehmen logo
1 von 99
PHP :ntroduction> Powered by www.RedOffice.com K.Sarveswaran Department of Computer Science, University of Jaffna [email_address]
Some references ,[object Object],[object Object],[object Object],[object Object]
Scripting languages ,[object Object],[object Object],[object Object]
Scripting languages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introduction to PHP ,[object Object],[object Object]
PHP - History ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PHP - History ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],http://www.php.net/manual/en/history.php.php
Who uses ,[object Object]
How it works
2. Setting up environment
2.0 Setting up environment ,[object Object],[object Object],[object Object]
2.1 Requirements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.2 Install XAMPP ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2.3 Test the environment ,[object Object],[object Object],[object Object],[object Object],[object Object]
3.0 PHP programming fundamentals
3.0 PHP Programming fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],Method 1 <?php //php codes ?> Method 2 <? //php codes ?> *short_open_tag Method 3 <script language=''php''> //php codes </script> Method 4 <% //php codes %> *asp_tags
3.1 Syntax definition ,[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],Type of first operand Type of second operand Final form Integer  Float Float Integer String Number Float String Float
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.1 Syntax definition ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
PHP Programming fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.2 Operators ,[object Object],[object Object]
3.3 Display data ,[object Object],[object Object],[object Object],[object Object]
PHP Programming fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object]
3.4 Control and Looping structures ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.5 Arrays ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
3.5 Arrays ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.0 Form handling
4.0 Form Handling ,[object Object],[object Object],[object Object],[object Object]
4.1 Task 1 ,[object Object],[object Object],[object Object],[object Object],[object Object],Task 1 : Write a PHP script (input_test.php) that checks whether the username is “user1” and if so it should display “Valid user” else it should give an error message saying “Invalid user”
4.2 Handling form data ,[object Object],[object Object],[object Object],[object Object]
4.3 HTML Form elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.3 HTML Form elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.3 HTML Form elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.3 HTML Form elements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
4.4 Task - 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
5.0 Some useful in-build functions
5.0 Useful in-build functions ,[object Object],[object Object],[object Object],[object Object]
6.0 File handling
6.0 File handling ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.1 Read and write to a text file ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.2 Task 3 Task 3 : Modify the profile_display.php so that the submitted content can be appended to a file
6.3 Integrate source files ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.4 File uploads ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.5 Task 4 Task 4 : Modify the profile_input.html so that users can upload their CV. Develop file_upload.php to check whether uploaded CV is in 'doc' format or 'pdf' format and the size of the CV is less than 100KB. Also save the uploaded file in a folder called uploads  within your current directory
Hints for Task 4  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
6.6 PHP file Configuration directives ,[object Object],[object Object],[object Object],[object Object],[object Object]
7.0 Database handling
7.0 Database handling ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
7.1 PHP Database support ,[object Object],[object Object]
7.2 MySQL - 1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
7.2 MySQL - 2 ,[object Object],[object Object],[object Object],[object Object],[object Object]
7.3 Database handing basics -1 ,[object Object],[object Object],[object Object],[object Object],[object Object],$db_handler =  mysql_connect ('hostname', 'mysql_user', 'mysql_password'); if (!$db_handler) {  die('Could not connect: ' .  mysql_error ()); } mysql_select_db (&quot;my_db&quot;, $db_handler);
7.3 Database handing basics -2 ,[object Object],[object Object],[object Object],[object Object],[object Object],$result =  mysql_query (&quot;SELECT * FROM table&quot;); while($row =  mysql_fetch_array ($result)) { echo $row['field1'] . &quot; &quot; . $row['field2']; } mysql_query (&quot;INSERT INTO Table (Field1, Field2) VALUES ('Value1', 'Value2')&quot;);
7.3 Database handing basics -3 ,[object Object],[object Object],[object Object],[object Object],[object Object],mysql_query (&quot;UPDATE Table SET field1 = '36' WHERE field2 = 'xyz' &quot;); mysql_query (&quot;DELETE FROM Table WHERE filed1=10 &quot;);
7.3 Database handing basics -4 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
7.4 Task 5 Task 5 : Create a MySQL database called  Test_DB . Inside that create a Table called  users  according to the following instructions Fieldname datatype values id int 1 name text admin age int 23 gender varchar(10) Male qualification varchar(10) UG interests varchar(10) Reading shortbio text Nothing username varchar(20) admin password varchar(32) admin123
7.5 Task 6 Task 6 : Develop authentication mechanism to your profile update system. Use the database to do the authentication. Develop a script call index.php. In that script, accept the username and password from User and do authentication. Direct authenticated users to Profile update page (profile_display.php). Others should be given with “Access Denied ” message Profile_display.php 1. Write to file 2. save CV index.php Access denied index.php 1. Login form 2. Authentication NO YES File validation script
7.5 Hints for Task 6  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
7.6 Task 7 Task 7 : Alter the profile_display.php so that it displays the existing user details (including a link to CV) at the top and give a input form to add details to database at the bottom. When a new user is added, the CV should be renamed to user's username and added to uploads directory.
8.0 Session handling
8.0 Session handling ,[object Object],[object Object],[object Object],[object Object],[object Object]
8.2 Cookie ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
8.3 Session ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
8.4 Task 8 Task 8 : Develop a page, change_password.php, to facilitate user to change the password Make a link in your profile page for change_password.php Profile_display.php 1. Manage Profiles index.php Access denied index.php 1. Login form 2. Authentication NO YES change_password.php Change password
8.5 PHP Configuration directives ,[object Object],[object Object],[object Object],[object Object]
9.0 OOP using PHP
9.1 PHP- OOP basics - 1 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
9.1 PHP- OOP basics - 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
9.1 PHP- OOP basics - 3 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Method invocation : Employee::greetEmp(); $emp=new Employee(); $emp->sayGoodbye();
9.1 PHP- OOP basics - 4 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
9.1 PHP- OOP basics - 5 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Calls : $employee1=new Employee(); Echo Employee::getEmp(); $employee2=new Employee(); Echo Employee::getEmp();
9.1 PHP- OOP basics - 6 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
10.0 PHP runtime Configuration of directives
10.0 PHP run time Configuration directives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
11.0 PHP Libraries
11.0 PHP Libraries ,[object Object],[object Object],[object Object],[object Object],[object Object]
11.1 PEAR ,[object Object],[object Object],<?php require_once &quot;DB.php&quot;; $DB = DB::connect(&quot;mysql://user:root123@localhost/testdb&quot;); if (DB::isError($DB)) echo &quot;Cannot connect to database: &quot; . $DB->getMessage(); else {   $Query = &quot;SELECT * FROM users&quot;;   $Result = $DB->query($Query);   echo $NumResults = $Result->numRows(); } ?>
11.2 PDO ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
12.0 File System and OS Functions
12.0 File System and OS Functions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
13.0 Frameworks
13.0 PHP Frameworks
14.0 PHP Security
14.0 PHP Security ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
15.0 PHP IDEs
15.0 PHP IDEs ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
16.0 PHP Systems
16.0 PHP systems ,[object Object],[object Object]
17.0 Discussions
Thank you ! K.Sarveswaran, iamsarves@gmail.com.  k.sarveswaran.lk

Weitere ähnliche Inhalte

Was ist angesagt? (20)

Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
 
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
 
PHP
PHPPHP
PHP
 
Php Tutorials for Beginners
Php Tutorials for BeginnersPhp Tutorials for Beginners
Php Tutorials for Beginners
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
PHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginnersPHP complete reference with database concepts for beginners
PHP complete reference with database concepts for beginners
 
PHP slides
PHP slidesPHP slides
PHP slides
 
Html
HtmlHtml
Html
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Control Structures In Php 2
Control Structures In Php 2Control Structures In Php 2
Control Structures In Php 2
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
What Is Php
What Is PhpWhat Is Php
What Is Php
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
 
Php with MYSQL Database
Php with MYSQL DatabasePhp with MYSQL Database
Php with MYSQL Database
 
Oops concepts in php
Oops concepts in phpOops concepts in php
Oops concepts in php
 
Javascript
JavascriptJavascript
Javascript
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Php basics
Php basicsPhp basics
Php basics
 

Andere mochten auch

Setting up a gmail account
Setting up a gmail accountSetting up a gmail account
Setting up a gmail accountkeelyswitzer
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPprabhatjon
 
Chapter 1Into the Internet
Chapter 1Into the InternetChapter 1Into the Internet
Chapter 1Into the InternetPatty Ramsey
 
Chapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationChapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationPatty Ramsey
 
Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...Pedro Llorens
 
Groundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan SchusterGroundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan SchusterTXGroundwaterSummit
 
Appendex d
Appendex dAppendex d
Appendex dswavicky
 
Ch3(working with file)
Ch3(working with file)Ch3(working with file)
Ch3(working with file)Chhom Karath
 
LiDAR Aided Decision Making
LiDAR Aided Decision MakingLiDAR Aided Decision Making
LiDAR Aided Decision MakingLidar Blog
 
Appendex e
Appendex eAppendex e
Appendex eswavicky
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHPEric Johnson
 
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater SourceGuidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater SourceeWater
 
Appendex b
Appendex bAppendex b
Appendex bswavicky
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionPHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionMazenetsolution
 
Appendex a
Appendex aAppendex a
Appendex aswavicky
 
Chapter 7 Multimedia
Chapter 7 MultimediaChapter 7 Multimedia
Chapter 7 MultimediaPatty Ramsey
 
Survey Grade LiDAR Technologies for Transportation Engineering
Survey Grade LiDAR Technologies for Transportation EngineeringSurvey Grade LiDAR Technologies for Transportation Engineering
Survey Grade LiDAR Technologies for Transportation EngineeringQuantum Spatial
 

Andere mochten auch (20)

Setting up a gmail account
Setting up a gmail accountSetting up a gmail account
Setting up a gmail account
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Voice
VoiceVoice
Voice
 
PHP - Introduction to PHP Date and Time Functions
PHP -  Introduction to  PHP Date and Time FunctionsPHP -  Introduction to  PHP Date and Time Functions
PHP - Introduction to PHP Date and Time Functions
 
Chapter 1Into the Internet
Chapter 1Into the InternetChapter 1Into the Internet
Chapter 1Into the Internet
 
Chapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationChapter 10 Synchronous Communication
Chapter 10 Synchronous Communication
 
Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...Application of dual output LiDAR scanning system for power transmission line ...
Application of dual output LiDAR scanning system for power transmission line ...
 
Groundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan SchusterGroundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan Schuster
 
Appendex d
Appendex dAppendex d
Appendex d
 
Ch3(working with file)
Ch3(working with file)Ch3(working with file)
Ch3(working with file)
 
LiDAR Aided Decision Making
LiDAR Aided Decision MakingLiDAR Aided Decision Making
LiDAR Aided Decision Making
 
Appendex e
Appendex eAppendex e
Appendex e
 
Introduction to PHP - SDPHP
Introduction to PHP - SDPHPIntroduction to PHP - SDPHP
Introduction to PHP - SDPHP
 
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater SourceGuidelines for Modelling Groundwater Surface Water Interaction in eWater Source
Guidelines for Modelling Groundwater Surface Water Interaction in eWater Source
 
Appendex b
Appendex bAppendex b
Appendex b
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet SolutionPHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet Solution
 
Appendex a
Appendex aAppendex a
Appendex a
 
Chapter 7 Multimedia
Chapter 7 MultimediaChapter 7 Multimedia
Chapter 7 Multimedia
 
Php i-slides
Php i-slidesPhp i-slides
Php i-slides
 
Survey Grade LiDAR Technologies for Transportation Engineering
Survey Grade LiDAR Technologies for Transportation EngineeringSurvey Grade LiDAR Technologies for Transportation Engineering
Survey Grade LiDAR Technologies for Transportation Engineering
 

Ähnlich wie Introduction to PHP

Ähnlich wie Introduction to PHP (20)

Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
Php intro
Php introPhp intro
Php intro
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Php
PhpPhp
Php
 
Open Source Package PHP & MySQL
Open Source Package PHP & MySQLOpen Source Package PHP & MySQL
Open Source Package PHP & MySQL
 
Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9Open Source Package Php Mysql 1228203701094763 9
Open Source Package Php Mysql 1228203701094763 9
 
Php1
Php1Php1
Php1
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0
 
PHP MySQL
PHP MySQLPHP MySQL
PHP MySQL
 

Mehr von Kengatharaiyer Sarveswaran

Natural Language Processing for Tamil and Sinhala
Natural Language Processing for Tamil and SinhalaNatural Language Processing for Tamil and Sinhala
Natural Language Processing for Tamil and SinhalaKengatharaiyer Sarveswaran
 
Department of Education - Northern Province - Grade 5 paper
Department of Education - Northern Province - Grade 5 paperDepartment of Education - Northern Province - Grade 5 paper
Department of Education - Northern Province - Grade 5 paperKengatharaiyer Sarveswaran
 
Concept paper for Educational Management Information System
Concept paper for Educational Management Information SystemConcept paper for Educational Management Information System
Concept paper for Educational Management Information SystemKengatharaiyer Sarveswaran
 
21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்
21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்
21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்Kengatharaiyer Sarveswaran
 
Teaching and Learning in Northern Province, Sri Lanka
Teaching and Learning in Northern Province, Sri LankaTeaching and Learning in Northern Province, Sri Lanka
Teaching and Learning in Northern Province, Sri LankaKengatharaiyer Sarveswaran
 

Mehr von Kengatharaiyer Sarveswaran (15)

Natural Language Processing for Tamil and Sinhala
Natural Language Processing for Tamil and SinhalaNatural Language Processing for Tamil and Sinhala
Natural Language Processing for Tamil and Sinhala
 
Developing Dependency Parsers for Tamil
Developing Dependency Parsers for TamilDeveloping Dependency Parsers for Tamil
Developing Dependency Parsers for Tamil
 
Thamizhi Language Processing Tools
Thamizhi Language Processing ToolsThamizhi Language Processing Tools
Thamizhi Language Processing Tools
 
Department of Education - Northern Province - Grade 5 paper
Department of Education - Northern Province - Grade 5 paperDepartment of Education - Northern Province - Grade 5 paper
Department of Education - Northern Province - Grade 5 paper
 
Digital transformation and the SME sector
Digital transformation and the SME sectorDigital transformation and the SME sector
Digital transformation and the SME sector
 
IP and ICT - Intro
IP and ICT - IntroIP and ICT - Intro
IP and ICT - Intro
 
Concept paper for Educational Management Information System
Concept paper for Educational Management Information SystemConcept paper for Educational Management Information System
Concept paper for Educational Management Information System
 
Concept paper - DIY Innovation Center
Concept paper - DIY Innovation CenterConcept paper - DIY Innovation Center
Concept paper - DIY Innovation Center
 
Presentation - CTC
Presentation - CTCPresentation - CTC
Presentation - CTC
 
Being 21st century teacher and e-Learning
Being 21st century teacher and e-LearningBeing 21st century teacher and e-Learning
Being 21st century teacher and e-Learning
 
Using the Internet for Learning
Using the Internet for LearningUsing the Internet for Learning
Using the Internet for Learning
 
21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்
21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்
21ம் நூற்றாண்டில் இணையக் கல்வியின் முக்கியத்துவம்
 
Teaching and Learning in Northern Province, Sri Lanka
Teaching and Learning in Northern Province, Sri LankaTeaching and Learning in Northern Province, Sri Lanka
Teaching and Learning in Northern Province, Sri Lanka
 
Introduction to Electronic Learning
Introduction to Electronic LearningIntroduction to Electronic Learning
Introduction to Electronic Learning
 
Joomla Manual in Tamil
Joomla Manual in TamilJoomla Manual in Tamil
Joomla Manual in Tamil
 

Kürzlich hochgeladen

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 

Kürzlich hochgeladen (20)

ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 

Introduction to PHP

  • 1. PHP :ntroduction> Powered by www.RedOffice.com K.Sarveswaran Department of Computer Science, University of Jaffna [email_address]
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 10. 2. Setting up environment
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. 3.0 PHP programming fundamentals
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. 5.0 Some useful in-build functions
  • 46.
  • 48.
  • 49.
  • 50. 6.2 Task 3 Task 3 : Modify the profile_display.php so that the submitted content can be appended to a file
  • 51.
  • 52.
  • 53. 6.5 Task 4 Task 4 : Modify the profile_input.html so that users can upload their CV. Develop file_upload.php to check whether uploaded CV is in 'doc' format or 'pdf' format and the size of the CV is less than 100KB. Also save the uploaded file in a folder called uploads within your current directory
  • 54.
  • 55.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65. 7.4 Task 5 Task 5 : Create a MySQL database called Test_DB . Inside that create a Table called users according to the following instructions Fieldname datatype values id int 1 name text admin age int 23 gender varchar(10) Male qualification varchar(10) UG interests varchar(10) Reading shortbio text Nothing username varchar(20) admin password varchar(32) admin123
  • 66. 7.5 Task 6 Task 6 : Develop authentication mechanism to your profile update system. Use the database to do the authentication. Develop a script call index.php. In that script, accept the username and password from User and do authentication. Direct authenticated users to Profile update page (profile_display.php). Others should be given with “Access Denied ” message Profile_display.php 1. Write to file 2. save CV index.php Access denied index.php 1. Login form 2. Authentication NO YES File validation script
  • 67.
  • 68. 7.6 Task 7 Task 7 : Alter the profile_display.php so that it displays the existing user details (including a link to CV) at the top and give a input form to add details to database at the bottom. When a new user is added, the CV should be renamed to user's username and added to uploads directory.
  • 70.
  • 71.
  • 72.
  • 73. 8.4 Task 8 Task 8 : Develop a page, change_password.php, to facilitate user to change the password Make a link in your profile page for change_password.php Profile_display.php 1. Manage Profiles index.php Access denied index.php 1. Login form 2. Authentication NO YES change_password.php Change password
  • 74.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82. 10.0 PHP runtime Configuration of directives
  • 83.
  • 85.
  • 86.
  • 87.
  • 88. 12.0 File System and OS Functions
  • 89.
  • 93.
  • 95.
  • 97.
  • 99. Thank you ! K.Sarveswaran, iamsarves@gmail.com. k.sarveswaran.lk