110 likes | 254 Views
PHP Overview. MIS 3501, Fall 2014 Jeremy Shafer Department of MIS Fox School of Business Temple University September 23, 2014. Overview. XAMPP m is350.temple.edu HTML5 PHP. XAMPP & mis3501.temple.edu. XAMPP Installed and working Know how to stop and start web services
E N D
PHP Overview MIS 3501, Fall 2014 Jeremy Shafer Department of MIS Fox School of Business Temple University September 23, 2014
Overview • XAMPP • mis350.temple.edu • HTML5 • PHP
XAMPP & mis3501.temple.edu • XAMPP • Installed and working • Know how to stop and start web services • Understand what a “document root” is and how it relates to the http://localhost in your browser • mis3501.temple.edu • Know how to upload files. • Understand how your wwwroot relates to the http://mis3501.temple.edu/youraccount URL
Overview: HTML • HTML5 • Know the basic structure <!DOCTYPE html> <html> <head> <title>sample page</title> </head> <body> <p>Hello world</p> </body> </html>
Overview: HTML continued • Know tables <table border='1'> <tr> <th>Shirt Sizes</th> </tr> <tr> <td>Small</td> </tr> <tr> <td>Medium</td> </tr> <tr> <td>Large</td> </tr> </table>
Overview: HTML continued • Know some basic tags <hr> <br> <em> <b>
Overview: HTML continued • Know HTML form basics <form name='myform' action='somepage.php‘ method=‘GET' > Some text: <input type='text' name='txtName' id='txtName'> <input type='submit' name='btnSubmit' id='btnSubmit' value='Go!'> </form> • Know how to use labels <form name='myform' action='somepage.php‘ method=‘GET' > <label for='txtName'>Some text:</label> <input type='text' name='txtName' id='txtName'> <input type='submit' name='btnSubmit' id='btnSubmit' value='Go!'> </form>
Overview: PHP • Code blocks <?php … ?> • Comment blocks /* */ // • Echo • Concatenate strings with . • Statements end with a semicolon ;
Overview: PHP Continued • Variables and operators • Naming rules • Assignment operator = • Arithmetic operators + - * /
Overview: PHP Continued • if statements if (condition) { // statements go here } • while statements while (condition) { // statements go here }
Overview: PHP Continued • The isset function is used to see if a URL token exits • $_GET['token_name_here'] is used to pull data out of the URL • === is used to check if two expressions are equivalent • AND is used to check if two expressions both evaluate to TRUE • OR is used to check if one of two expressions evaluates to TRUE