SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Php Using Arrays
Php Using ArraysPhp Using Arrays
Php Using Arrays
mussawir20
 

Tendances (20)

Operators in PHP
Operators in PHPOperators in PHP
Operators in PHP
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
PHP Presentation
PHP PresentationPHP Presentation
PHP Presentation
 
Php Using Arrays
Php Using ArraysPhp Using Arrays
Php Using Arrays
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
4.2 PHP Function
4.2 PHP Function4.2 PHP Function
4.2 PHP Function
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Php string function
Php string function Php string function
Php string function
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
 
JavaScript - Chapter 12 - Document Object Model
  JavaScript - Chapter 12 - Document Object Model  JavaScript - Chapter 12 - Document Object Model
JavaScript - Chapter 12 - Document Object Model
 
PHP
PHPPHP
PHP
 
jQuery
jQueryjQuery
jQuery
 
CSS Transitions, Transforms, Animations
CSS Transitions, Transforms, Animations CSS Transitions, Transforms, Animations
CSS Transitions, Transforms, Animations
 
Html table
Html tableHtml table
Html table
 
Php tutorial
Php  tutorialPhp  tutorial
Php tutorial
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
 
Class 3 - PHP Functions
Class 3 - PHP FunctionsClass 3 - PHP Functions
Class 3 - PHP Functions
 
PHP - Introduction to File Handling with PHP
PHP -  Introduction to  File Handling with PHPPHP -  Introduction to  File Handling with PHP
PHP - Introduction to File Handling with PHP
 

En vedette

Setting up a gmail account
Setting up a gmail accountSetting up a gmail account
Setting up a gmail account
keelyswitzer
 
Chapter 1Into the Internet
Chapter 1Into the InternetChapter 1Into the Internet
Chapter 1Into the Internet
Patty Ramsey
 
Chapter 10 Synchronous Communication
Chapter 10 Synchronous CommunicationChapter 10 Synchronous Communication
Chapter 10 Synchronous Communication
Patty Ramsey
 
Groundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan SchusterGroundwater Research and Technology, Stefan Schuster
Groundwater Research and Technology, Stefan Schuster
TXGroundwaterSummit
 
Appendex d
Appendex dAppendex d
Appendex d
swavicky
 
Appendex e
Appendex eAppendex e
Appendex e
swavicky
 
Appendex b
Appendex bAppendex b
Appendex b
swavicky
 
Appendex a
Appendex aAppendex a
Appendex a
swavicky
 
Chapter 7 Multimedia
Chapter 7 MultimediaChapter 7 Multimedia
Chapter 7 Multimedia
Patty Ramsey
 

En vedette (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
 

Similaire à 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
 
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
 
course slides -- powerpoint
course slides -- powerpointcourse slides -- powerpoint
course slides -- powerpoint
 

Plus de Kengatharaiyer Sarveswaran

Plus de 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
 

Dernier

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Dernier (20)

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.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