--Your friends at LectureNotes

Note for Web Technologies - WT By New Swaroop

  • Web Technologies - WT
  • Note
  • University of mysore - Gangotri
  • Computer Science Engineering
  • 1 Offline Downloads
  • Uploaded 8 months ago
New Swaroop
New Swaroop
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Introduction to PHP Lesso n 1: Int ro duct io n Wo rking in Co deRunner Creating a File Managing yo ur Files Fo ur characteristics o f PHP 1. PHP is a server-side language, with HTML embedding. 2. PHP is a Parsed language. 3. PHP wo rks jo intly with SQL. 4. PHP is part o f the LAMP, WAMP, and MAMP stack. Lesso n 2: PHP Basics PHP Delimiters and Co mments Variables in PHP Mo difying Variables and Values with Operato rs Superglo bals $GLOBALS $_SERVER: $_GET $_POST Lesso n 3: De cisio ns Co mpariso n Operato rs and Co nditio ns IF and ELSE Co ntro l Structure Lo gical Operato rs A Brief Preview o f Fo rms Lesso n 4: Mult iple Co nt ro l St ruct ure s and Lo o ps Multiple Co ntro l Structures WHILE and FOR Lo o ps Lesso n 5: Funct io ns Creating Co de Reusability with Functio ns Functio n and Variable Sco pes Using Functio ns with Parameters and Return Values Sneaking In with Parameters Sneaking o ut with Return Values Multiple Parameters and Default Values Lesso n 6 : Arrays Creating an Array Asso ciative Arrays Creating Multi-Dimensio nal Arrays Traversing and Manipulating Arrays Traversing Asso ciative Arrays with list() and each() Mo re built-in functio ns

Text from page-2

Lesso n 7: St rings What's a String Anyway? Manipulating Strings Other nifty string sho rtcuts Built-in String Functio ns Regular Expressio ns Character Ranges and Number o f Occurrences Excluding Characters Escaping Characters Lesso n 8 : Fixing Bro ke n PHP Things Pro fesso rs Do n't Talk Abo ut Eno ugh Debugging Tips Utilizing Erro r Messages Riddle-Me-This Erro r Messages Erro rs witho ut Erro r Messages Lo gical Erro rs Infinite Lo o ps, Infinite Headaches No tes o n Scalable Pro gramming Befo re yo u Co de, Pseudo co de Make yo ur Pro gram Readable Co mment Until Yo u're Blue in the Face Co de in Bite-Size Chunks Debug as Yo u Wo rk Reuse Functio ns as Much as Po ssible Utilize Available Reso urces Lesso n 9 : Fo rm s in PHP Fo rms Review Using Superglo bals to Read Fo rm Inputs Extracting Superglo bals into Variables Nesting Variable Names Lesso n 10 : Ut ilizing Int e rne t T o o ls Enviro nment and Server Variables Using HTTP Headers Manipulating Query Strings Custo mizing specific erro r messages Sending Emails Lesso n 11: Dat e and T im e Date and Time Standards Date and Time Functio ns Co nstructing Dates and Times Lesso n 12: Using File s Including and Requiring Files Reading and Writing Files

Text from page-3

Allo wing Users to Do wnlo ad Files Lesso n 13: Co o kie s and Se ssio ns Using Co o kies Kno wing the User Thro ugh Sessio ns Deleting Sessio ns Lesso n 14: Final Pro je ct Final Pro ject Copyright © 1998-2014 O'Reilly Media, Inc. This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. See http://creativecommons.org/licenses/by-sa/3.0/legalcode for more information.

Text from page-4

Introduction Welco me to the O'Reilly Scho o l o f Techno lo gy Int ro duct io n t o PHP co urse! In this PHP class, yo u will learn basic to intermediate pro gramming aspects o f PHP--hypertext prepro cesso r. PHP is a versatile server-side pro gramming language that wo rks hand-in-hand with fro nt-end web languages such as HTML and JavaScript. PHP can be used to create all types o f dynamic web interfaces, and because o f its o pen-so urce ro bustness, has beco me o ne o f the mo st widely used pro gramming languages fo r the internet. Course Objectives When yo u co mplete this co urse, yo u will be able to : develo p web applicatio ns using basic PHP elements such as delimiters, co ntro l structures, o perato rs, variables, arrays, and functio ns. manipulate dates and strings using built-in PHP functio ns and regular expressio ns. debug and impro ve co de fo r better reusability and scalability. create dynamic web fo rms using internet to o ls such as input, enviro nment and server variables, HTTP headers, and query strings. read, write, manage and do wnlo ad files thro ugh PHP-based web applicatio ns. track user info rmatio n using co o kies and sessio ns. build a full-fledged sho pping cart system. Fro m beginning to end,yo u will learn by do ing yo ur o wn PHP based pro jects. These pro jects, as well as the final pro ject, will add to yo ur po rtfo lio and pro vide needed experience. Besides a bro wser and internet co nnectio n, all so ftware is pro vided o nline by the O'Reilly Scho o l o f Techno lo gy. Learning with O'Reilly School of T echnology Courses As with every O'Reilly Scho o l o f Techno lo gy co urse, we'll take a user-active appro ach to learning. This means that yo u (the user) will be active! Yo u'll learn by do ing, building live pro grams, testing them and experimenting with them— hands-o n! To learn a new skill o r techno lo gy, yo u have to experiment. The mo re yo u experiment, the mo re yo u learn. Our system is designed to maximize experimentatio n and help yo u learn to learn a new skill. We'll pro gram as much as po ssible to be sure that the principles sink in and stay with yo u. Each time we discuss a new co ncept, yo u'll put it into co de and see what YOU can do with it. On o ccasio n we'll even give yo u co de that do esn't wo rk, so yo u can see co mmo n mistakes and ho w to reco ver fro m them. Making mistakes is actually ano ther go o d way to learn. Abo ve all, we want to help yo u to learn to learn. We give yo u the to o ls to take co ntro l o f yo ur o wn learning experience. When yo u co mplete an OST co urse, yo u kno w the subject matter, and yo u kno w ho w to expand yo ur kno wledge, so yo u can handle changes like so ftware and o perating system updates. Here are so me tips fo r using O'Reilly Scho o l o f Techno lo gy co urses effectively: T ype t he co de . Resist the temptatio n to cut and paste the example co de we give yo u. Typing the co de actually gives yo u a feel fo r the pro gramming task. Then play aro und with the examples to find o ut what else yo u can make them do , and to check yo ur understanding. It's highly unlikely yo u'll break anything by experimentatio n. If yo u do break so mething, that's an indicatio n to us that we need to impro ve o ur system! T ake yo ur t im e . Learning takes time. Rushing can have negative effects o n yo ur pro gress. Slo w do wn and let yo ur brain abso rb the new info rmatio n tho ro ughly. Taking yo ur time helps to maintain a relaxed, po sitive appro ach. It also gives yo u the chance to try new things and learn mo re than yo u o therwise wo uld if yo u blew thro ugh all o f the co ursewo rk to o quickly. Expe rim e nt . Wander fro m the path o ften and explo re the po ssibilities. We can't anticipate all o f yo ur questio ns and ideas, so it's up to yo u to experiment and create o n yo ur o wn. Yo ur instructo r will help if yo u go co mpletely o ff the rails. Acce pt guidance , but do n't de pe nd o n it . Try to so lve pro blems o n yo ur o wn. Go ing fro m misunderstanding to understanding is the best way to acquire a new skill. Part o f what yo u're learning is pro blem so lving. Of co urse, yo u can always co ntact yo ur instructo r fo r hints when yo u need them.

Lecture Notes