Intro to Web Programming Presented by Blaine Hilton
Agenda Hand out Packets Rules, Expectations, and other Required Stuff Introductions – Why are you here? Introduction to LAMP Software Introduction
Rules and such Come to class Be here on time Turn any noise maker off Pay for the class, if you haven’t already Don’t cheat Ask questions
Ask Questions We only have 8 sessions Each session is 3 hours I’m going to make a very wide array of information If you don’t understand something, its going to get worst, not better If I’m not asked anything I’m going to assume I should move through the material faster
The book PHP and MySQL Web Development ISBN: 946 pages Equals 135 pages to read per week Get it, its worth it, you will use it after the class
LAMP Application Stack Linux Apache MySQL PHP WAMP Comparison
Development Workflow Edit files locally Publish to server Setup database Test Debug
File Transfer Methods FTP SFTP SCP Subversion
Introduction to the Lab Our software is installed in the middle row Anything you save on the lab computer will be erased at the end of class. All files must be saved to your flash drive, it is highly recommended to backup your flash drive to another drive and/or your home computer often
Software Introduction PuTTY Subversion Tortoise SVN Programmers Notepad WinSCP phpMyAdmin
Our Web Server firstinitiallastname.web-design-class.com
Hello World Hello World! Hello World! Hello World Hello World
Save and upload Make a folder on your flash drive Save as “index.php” Subversion upload WinSCP Transfer
HTML Tags to Know - - Text Text
Table Example # # Name Name 1 1 Blaine Blaine 2 2 Rick Rick
Form Elements Text Box Text Area Select Select Multiple Radio Checkbox Submit Hidden
Form Elements in HTML <select name=“name” Display Display Display Display
Form Elements in HTML
HTML Notes To be well formed HTML needs to follow some rules: All tags are always lower case All tags are always lower case All tags must be closed All tags must be closed
Form Example Start with Hello World
Database Introduction Key Terms Database Database Table Table Fields/Columns Fields/Columns Relationships Relationships Keys Keys
Field Types INT FLOAT VARCHAR TEXT TINYINT
Database Keys Primary Key Unique Key FullText
Database Communication - SQL INSERT SELECT UPDATE
PHP Introduction Note: Opening Opening Closing Closing Semi Colon Semi Colon
Variables <?php $university= ‘Purdue’ ; echo “$university” ; ?> Note: Variable name starts with $ Variable name starts with $ Colon ends each line Colon ends each line Multiple lines can be within one opening/closing block Multiple lines can be within one opening/closing block
Combining Strings <?php $fname= ‘Blaine’ ; $lname= ‘Hilton’ ; $university= ‘Purdue’ ; echo ‘My name is ‘.”$fname”.’ and I attend ‘.”$university”’.’ ; ?> Note: Again, anytime you open/start you must close/end Again, anytime you open/start you must close/end Single quotes are for non-changing information Single quotes are for non-changing information Double quotes are for information that can change (variabiles, ect…) Double quotes are for information that can change (variabiles, ect…) You can usually always use double quotes, but it makes the page load longer (more to think about) You can usually always use double quotes, but it makes the page load longer (more to think about)
First Application Goal: Have students register their likes and dislikes. Have students register their likes and dislikes. What we need: First Name First Name Last Name Last Name Favorite Color Favorite Color What else?