SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

JavaScript
JavaScriptJavaScript
JavaScript
 
Php mysql ppt
Php mysql pptPhp mysql ppt
Php mysql ppt
 
Uploading a file with php
Uploading a file with phpUploading a file with php
Uploading a file with php
 
Php
PhpPhp
Php
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Javascript
JavascriptJavascript
Javascript
 
Introduction To PHP
Introduction To PHPIntroduction To PHP
Introduction To PHP
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
Chapter 02 php basic syntax
Chapter 02   php basic syntaxChapter 02   php basic syntax
Chapter 02 php basic syntax
 
PHP
PHPPHP
PHP
 
Php string function
Php string function Php string function
Php string function
 
Php basics
Php basicsPhp basics
Php basics
 
HTML Fundamentals
HTML FundamentalsHTML Fundamentals
HTML Fundamentals
 
Introduction to JavaScript
Introduction to JavaScriptIntroduction to JavaScript
Introduction to JavaScript
 
Files in php
Files in phpFiles in php
Files in php
 
Php Tutorials for Beginners
Php Tutorials for BeginnersPhp Tutorials for Beginners
Php Tutorials for Beginners
 
PHP
PHPPHP
PHP
 
Statements and Conditions in PHP
Statements and Conditions in PHPStatements and Conditions in PHP
Statements and Conditions in PHP
 

Destaque

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
 

Destaque (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
 

Semelhante a 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
 

Mais de Kengatharaiyer Sarveswaran

Mais 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
 

Último

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
heathfieldcps1
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
kauryashika82
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
MateoGardella
 

Último (20)

1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
Gardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch LetterGardella_PRCampaignConclusion Pitch Letter
Gardella_PRCampaignConclusion Pitch Letter
 

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