Introduction to PHP - Chakarov

Introduction To PHP Chakarov-ppt Download

  • Date:05 Aug 2020
  • Views:25
  • Downloads:0
  • Size:315.00 KB

Share Presentation : Introduction To PHP Chakarov

Download and Preview : Introduction To PHP Chakarov

Report CopyRight/DMCA Form For : Introduction To PHP Chakarov


PHP IntroductionBy Trevor Adams Topics Covered Server side web programming Client Server systems.
Comparison with static HTML PHP what is it What does it do PHP Language basics Syntax Variables Constants Operators.
Decision making PHP and the client Client Server on the WWW Standard web sites operate on arequest response basis.
A user requests a resource E g HTML Server responds by delivering the documentto the client The client processes the document anddisplays it to user.
Server Side Programming Provides web site developers to utilise resources onthe web server Non public resources do not require direct accessfrom the clients.
Allows web sites to be client agnostic unlessJavaScript is used also Most server side programming script is embeddedwithin markup although does not have to be sometimes better not to .
PHP What is it does it do PHP PHP Hypertext Pre processor Programming language that is interpretedand executed on the server Execution is done before delivering content to.
the client Contains a vast library of functionality thatprogrammers can harness Executes entirely on the server requiring nospecific features from the client.
PHP What is it does it do Static resources such as regular HTML are simply output tothe client from the server Dynamic resources such as PHP scripts are processed on theserver prior to being output to the client.
PHP has the capability of connecting to many databasesystems making the entire process transparent to the clientWeb Page Request Load PHP FilePHP Engine Run Script.
HTML Response PHP ResultsUser Web Server PHP Summary PHP PHP Hypertext Pre processor Interpreted and executed by the server on.
page request Returns simple output to the client Provides a tremendous amount offunctionality to programmers Can connect transparently to many database.
PHP Language Basics Lookat the building blocks of the PHP Syntax and structure Variables constants and operators Data types and conversions.
Decision making IF and switch Interacting with the client application HTML PHP Syntax and Structure PHP is similar to C All scripts start with php and with with .
Line separator semi colon Code block code here brace brackets White space is generally ignored not in strings Comments are created using single line quote.
Multiple line block quote Precedence Enforced using parentheses E g sum 5 3 6 would equal 23 sum 5 3 6 would equal 48.
PHP Variables Prefixed with a Assign values with operator Example author Trevor Adams No need to define type.
Variable names are case sensitive author and Author are different PHP Example Script author Trevor Adams msg Hello world .
echo author says msg PHP Constants Constants are special variables that cannotbe changed Use them for named items that will not.
Created using a define function define milestokm 1 6 Used without km 5 milestokm PHP Operators.
Standard mathematical operators and modulus String concatenation with a period car SEAT Altea echo car would output SEAT Altea .
Basic Boolean comparison with Using only will overwrite a variable value Less than and greater than and as above but include equality PHP Data Types.
PHP is not strictly typed Different to JAVA where all variables are declared A data type is either text or numeric PHP decides what type a variable is PHP can use variables in an appropriate way automatically.
vat rate 0 175 VAT Rate is numeric echo vat rate 100 outputs 17 5 vat rate is converted to a string for the purpose of the echo Object Array and unknown also exist as types Beaware of them but we shall not explore them today.
PHP embedded language PHP can be placed directly inside HTML E g html head title Basic PHP page title head body .
h1 php echo Hello World h1 body html Decision Making Basics Decision making involves evaluating Boolean.
expressions true false If catishungry feed cat true and false are reserved words Initialise as valid false Compare with .
AND and OR for combinations E g if catishungry AND havefood feed PHP IF statement Used to perform a conditional branch If Boolean expression .
one or more commands if true else one or more commands if false PHP Switch Statements Useful when a Boolean expression may have.
many options E g switch choice case 0 do things if choice equal 0 Case 1 do things if choice equal 1 Case 2 do things if choice equal 2 .
Default do if choice is none of the above PHP one small step for man One giant leap for level 1 students First few steps are crucial topics covered Basic structure and syntax.
Variables constants and operators Data types and conversions Decision making Any questions so far PHP Dealing with the Client.
Allvery nice but How is it useful in your web site PHP allows you to use HTML forms Forms require technology at the server toprocess them.
PHP is a feasible and good choice for theprocessing of HTML forms PHP Dealing with the client Quick re cap on forms Implemented with a form element in HTML.
Contains other input text area list controlsand options Has some method of submitting PHP Dealing with the client Text fields.
Checkbox Radio button List boxes Hidden form fields Password box.
Submit and reset buttons PHP Dealing with the client form method post action file php name frmid Method specifies how the data will be sent Action specifies the file to go to E g file php.
id gives the form a unique name Post method sends all contents of a form withbasically hidden headers not easily visible to users Get method sends all form input in the URL requestedusing name value pairs separated by ampersands.
E g process php name trevor number... Is visible in the URL shown in the browser PHP Dealing with the client All form values are placed into an array Assume a form contains one textbox called.
txtName and the form is submitted using the postmethod invoking process php process php could access the form data using POST txtName If the form used the get method the form data would.
be available as GET txtName PHP Dealing with the client For example an HTML form form id showmsg action show php .
method post input type text id txtMsg value Hello World input type submit id submit value Submit form PHP Dealing with the client.
A file called show php would receive thesubmitted data It could output the message for example html head title Show Message title head .
body h1 php echo POST txtMsg h1 body html PHP Dealing with the client.
Summary Form elements contain input elements Each input element has an id If a form is posted the file stated as the action POST inputid .
If a form uses the get method GET inputid Ensureyou set all id attributes for formelements and their contents PHP Introduction Summary.
Topics covered Server side architecture brief overview Basic PHP language topics Syntax Variables Constants and Operators.
Decision making IF and Switch statements Dealing with the client Useful Links and Further Study W3 Schools http www w3schools com php PHP web site http www php net .
Choi W 2000 Beginning PHP4 Wrox Press ISBN 1 861003 73 0 http www fcet staffs ac uk tja... Web site will be updated before accompanying tutorial Will contain a useful supplement to tutorial content.
PHP: Introduction By Trevor Adams Topics Covered Server side web programming Client/Server systems Comparison with static HTML PHP - what is it? What does it do? PHP Language basics Syntax Variables, Constants, Operators Decision making PHP and the client Client/Server on the WWW Standard web sites operate on a request/response basis A user ...

Related Presentations

Introduction to Networking ITN Chakarov

Completion of a skills test which will be based on content from both Networking Fundamentals and Routing Protocols and Concepts (1 hour and 30 minutes Duration) This assessment is closed book. This skills test is an individual exercise. Case . Study . Completion of a case study in the form of a report. Log . book. Consists of 12 questions

19 Views0 Downloads

Introduction to networking Chakarov

Routers have multiple network interfaces representing multiple networks. The primary activity of a router is to forward packets via the best path. Routers use a routing table to determine the best path. Ports and interfaces refer to two different aspects. Routers work at layers 1, 2 and 3 of the OSI model, with layer 3 being the primary ...

32 Views0 Downloads

IT Skills Chakarov

Resources Richard Hancock - 2010 * Use Case Diagrams More Use Case Diagrams Unified Modelling Language Exercise Richard Hancock - 2010 * Develop a use case diagram for ordering an item from a catalogue company (e.g. Argos) and paying for it Assume that you are in the store ready to pick up the item Assume the item is in stock Assume the item ...

11 Views0 Downloads

ITIL v3 Overview Chakarov

ITIL v3 Overview - Rob Goodwin-Davey Continual Service Improvement Responsible for managing improvements to IT Service Management Process and IT Services across the whole Service Lifecycle. To continually align and re-align IT services to the changing business needs by identifying and implementing improvements to IT services that support ...

11 Views0 Downloads

PHP An Introduction

service support education extensions open source companies IBM uses and develops Apache and Linux; created Secure Mailer and created other software on AlphaWorks Apple released core layers of Mac OS X Server as an open source BSD operating system called Darwin; open sourcing the QuickTime Streaming Server and the OpenPlay network gaming toolkit ...

34 Views0 Downloads

Introduction to PHP

Data Types (1) PHP has eight different data types – 5 basic and 2 composite types and 1 resource type. The 5 basic data types are: integers: whole numbers in the range -2,147,483,648 to +2,147,483,647 on 32-bit architecture.

28 Views0 Downloads

Introduction to PHP University of Michigan

Introduction to PHP Dr. Charles Severance Note from Chuck. If you are using these materials, you can remove my name and URL from this replace it with your own, but please retain the CC-BY logo on the first page as well as retain the entire last page when you remix and republish these slides.

10 Views0 Downloads

Introduction to PHP instesre org

Introduction to PHP – Chapter 8 Working with PHP JavaScript vs. PHP PHP scripts are similar to JavaScript scripts, but be careful with syntax! PHP variables always begin with a “$” symbol. There is no equivalent to JavaScript’s “var” data declaration. PHP scripts are embedded within a <?php … ?> tag.

7 Views0 Downloads

Introduction to PHP Mahasarakham University

Web Development. FINAL 50%. Week5-6. Web Services. XML. Web Service Client. Web Service Server. Web2.0 Mashup. Week7. PHP template with Smarty

12 Views0 Downloads

Introduction to PHP WA4E

Introduction to PHP Last modified by: Sue Blumenberg Document presentation format: On-screen Show (16:9) Other titles: Helvetica MS Pゴシック Arial Gill Sans Lucida Grande ヒラギノ角ゴ ProN W3 Courier 1_Office Theme Office Theme PHP Arrays PHP Arrays Rock! Associative Arrays Integer Indices Key / Value Dumping an Array var_dump vs ...

15 Views0 Downloads

Introduction to PHP WPI

Introduction to PHP “PHP is a server-side scripting language designed specifically for the Web. Within an HTML page, you can embed PHP code that will be executed each time the page is visited. Your PHP code is interpreted at the Web server and generates HTML or other output that the visitor will see” (“PHP and MySQL Web Development ...

14 Views0 Downloads

Introduction to Server Side Development with PHP

PHP Comments. The types of comment styles in PHP are: Single-line comments. Lines that begin with a # are comment lines and will not be executed. Multiline (block) comments. These comments begin with a /* and encompass everything that is encountered until a closing */ tag is found. End-of-line comments

12 Views0 Downloads