User Tools

Site Tools


eg-259:lecture18

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
eg-259:lecture18 [2012/03/20 08:06] – [Example – Popcorn Sales Receipt] eechriseg-259:lecture18 [2013/03/08 18:04] (current) – [PHP for Web Applications] eechris
Line 2: Line 2:
 ====== PHP for Web Applications ====== ====== PHP for Web Applications ======
  
-**Contact Hour 21**: To be discussed on Tuesday 27th March, 2012.+**Supplementary Material** 
 + 
 +Provided for Reference. This material is no longer taught on this module.
  
 **Lecturer**: [[C.P.Jobling@Swansea.ac.uk|Dr Chris P. Jobling]]. **Lecturer**: [[C.P.Jobling@Swansea.ac.uk|Dr Chris P. Jobling]].
  
 Using PHP for web applications development. Using PHP for web applications development.
- 
  
  
Line 227: Line 228:
  
     * If the query string has ''colour=light&taste=malty''     * If the query string has ''colour=light&taste=malty''
-    * ''$_POST["colour")'' will return ''"light"'' and ''$_POST["taste")'' will return ''"malty"'' +    * ''$_POST["colour"]'' will return ''"light"'' and ''$_POST["taste"]'' will return ''"malty"'' 
     * Query matching will also turn check box group ''colour=red&colour=blue'' to an array so that ''$_POST["colour"]'' returns the right thing.      * Query matching will also turn check box group ''colour=red&colour=blue'' to an array so that ''$_POST["colour"]'' returns the right thing. 
  
Line 550: Line 551:
   * Output   * Output
  
-{{eg-259:l18-popcorn3-output.png|receipt for Popcorn oder}}+<html> 
 +        <h4> Customer</h4> 
 +     <br />  <br />  <br />    <p /> <p /> 
 +<table border = "border"> 
 +      <caption> Order Information </caption> 
 +      <tr> 
 +        <th> Product </th> 
 +        <th> Unit Price </th> 
 +        <th> Quantity Ordered </th> 
 +        <th> Item Cost </th> 
 +      </tr> 
 +      <tr align = "center"> 
 +        <td> Unpopped Popcorn </td> 
 +        <td> $3.00 </td> 
 +        <td> 0 </td> 
 +        <td> $ 0.00        </td> 
 +      </tr> 
 +      <tr align = "center"> 
 +        <td> Caramel Popcorn </td> 
 +        <td> $3.50 </td> 
 +        <td> 0 </td> 
 +        <td> $ 0.00        </td> 
 +        </tr> 
 +      <tr align = "center"> 
 +        <td> Caramel Nut Popcorn </td> 
 +        <td> $4.50 </td> 
 +        <td> 0 </td> 
 +        <td> $ 0.00        </td> 
 +      </tr> 
 +      <tr align = "center"> 
 +        <td> Toffey Nut Popcorn </td> 
 +        <td> $5.00 </td> 
 +        <td> 0 </td> 
 +        <td> $ 0.00        </td> 
 +      </tr> 
 +    </table> 
 +    <p /> <p /> 
 + 
 +    You ordered 0 popcorn items <br />Your total bill is: $  0.00 <br />Your chosen method of payment is:  <br /> 
 +</html>
  
 ===== Files ===== ===== Files =====
eg-259/lecture18.1332230780.txt.gz · Last modified: 2012/03/20 08:06 by eechris