Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PHP 101+1:function & form

PHP 101+1:function & form

Fundamental PHP & Web Development

LucienLee

July 02, 2013
Tweet

More Decks by LucienLee

Other Decks in Programming

Transcript

  1. Scope $A = “hello”; echo $A; //”hello” function inner(){ $A

    = “world”; echo $A; //”world” } 11
  2. from 22 •action: Specifies where to send the form-data when

    a form is submitted. •method: Specifies the HTTP method to use when sending form-data. •name:Specifies the name of a form.
  3. textarea <textarea rows="4" cols="50"> At w3schools.com you will learn how

    to make a website. We offer free tutorials in all web development technologies. </textarea> 27 from w3schools
  4. GET •Retrieve data •remain in the browser history •never be

    used when dealing with sensitive data •have length restrictions 33
  5. POST •query sent in HTTP message body •do not remain

    in the browser history •no restrictions on data length •(as create in RESTful) 34
  6. HomeWork 40 • make a drink order form and when

    user confirm, calculate the total money. • if amount of drinks is greater than 10, all drinks have 10% discount. • ceiling the final price.
  7. HomeWork Advanced 42 • make a drink order form and

    when user confirm, calculate the total money. • ordering black tea and green tea together has 20% discount. • expect drinks with above-mentioned discount, if amount of drinks is greater than 10, these drinks have 10% discount.