MySQL and PHP - CIS159/CIT32

Weekly Schedule

Remember RE-SUBMIT. If you get back a homework with errors and without a grade it means it has not been graded - you need to fix and resubmit to get a grade.

Week Information
Assignments due in one week unless otherwise stated. I may add some things during the week, so double check the schedule each week! For almost all the assignments I want to see the code you write and the output it produces. So send me the address and a copy of the code. With play computer assignments give me the code and the output as you feel it would be generated. Please keep copies of all work you submit until you receive your final grade at the end of the semester.
Week #12
Week of November 20th
We are going to look on the section with images.
Images First Group PHP zipped
Images Second Group PHP zipped
Check back!
Assignments:
Quiz on databases and images Just to clarify when you bring up a random picture I want the address taken from the database table to be used. Really more like homework!
Week #11
Week of November 13th
I will be out on Monday and Tuesday of this week. Erik will be available Monday from 11:30 to 2:30 in K101, Tuesday from 9:30 to 3:30 in K101 and Thursday from 4:00 to 6:00 in K105. These are open labs that anyone can attend.
We will continue looking at arrays this week and then move on to images maybe... Check back!
Array Group Second PHP zipped
Array Group Third PHP zipped
Assignments:
Math Array
Assignment:The statements Multiply by 0, Multiply by 1 are stored in a one dimension array and displayed. You need to extract the message from the array and display it before you show each group. You are going to display the math facts and the answers. The answers need to be stored in a two dimensional array. Set up a two level table to print out the math facts and get the answer from the two dimensional array. The two multipliers are the indexes that allow you to extract the answer. I used a nested while loop to do this and another time I used a nested for loop.
Check back!
Week #10
Week of November 30th
Check CIS120 for Erik's schedule. I changed my mind about the next classes and decided to go directly to the lets take in and report back on one page. That involves functions so we are going to go there and then talk about updating in this way which really is far more interactive.
FunctionGroupPHP.zip
UpdateFunctionPHP.zip
Assignments:
First: Under FunctionGroupPHP there are programs dealing with weight of packages. There is an html that passes to a php. I want you to change these programs so that the data can be gathered in the same program that delivers the results.
Second: You need to write an update program that can add, change or delete the fields on a table. I am looking for effective maintenance and something easy for the user to work with. If you need some extra time on this, let me know.
Week #9
Week of October 30th
Erik is available Monday 2-3 in K101, Tues 2 - 3:3- in K101 and Thurs 4-6 in K105.
We will start the week by looking at updating records using PHP with MySQL.
Next we will start arrays.
Array Group First
Assignments:
These will be worked on in class:
Connect quiz
Array Quiz
Check back!
Week #8
Week of October 23rd
This week we are going to continue connecting MySQL with PHP. We looked at FirstConnect Group last week and did a little with SecondConnectGroup.
First Connect Group zipped
Connect Explanation
Second Connect Group OK
You need to make a link password file using my model and you either need to make an inventory database or make a database of your own to use or these examples will not work for you.
Third Connect Group
Assignments:
Catch up week!
Week #7
Week of October 16th
We will start the week looking at SQL and then use PHP to connect to MySQL databases.
First Connect Group zipped
Connect Explanation
Second Connect Group OK
Assignments:
MySQL PHP assignment
Week #6
Week of October 9th
I believe Erik will be available Tuesday (BCC Monday) 2-4 and Thursday 2-6 (check back on this one). I will be in and out both days.
We will work with MySQL/MariaDB and Putty and there are a lot of resources on the web for reference.
We will start with these and move on as time allows:
Beginning MySQL notes
Data types
More SQL
Notes:
Keys, indexes etc.
Subqueries
Multiple tables
Functions
Check back and see how far we got and get assignments!
Assignments:
workingwithSQL.doc Show me the output that would be produced.
SQL Assignment 2
Week #5
Week of October 2nd
We are trying different times, Erik will be available Monday from 2-3, Tuesday from 2-4 and Thursday from 4:30-6:30. I will come and go. I need to cancel my office hour on Tues at 2, I have a meeting. I will have an office hour Monday at 10. I will also be around later on Tues and Thurs afternoon. Check K101 or my office. I strongly sugggest you set up some study groups and meet when Erik is available to answer questions.
We will work with MySQL/MariaDB and Putty and there are a lot of resources on the web for reference.
We will start with these:
Beginning MySQL notes
Data types
More SQL
Please look at the examples in the FifthGroupPHP.
Assignments:
SQL assignment I know the directions say picture of screen but in fact I would prefer just copying the output and pasting it in so it is more readable - check putty directions for doing this!
Note that in the sample, I took an example I had used in Oracle. You need to check out how to do the date in MySQL and/or MariaDB as the version we are using is called.
Please check back!
Week #4
Week of September 25th
We will look at Fourth Group PHP and Fifth Group PHP and then start to look at MySQL.
Beginning MySQL notes
MySQL and putty
Using Putty in MySQL as of Feb 16,2016
Experiment with MySQL please.
Check back!
Assignments:
Loop Quiz: without loop program Please download this program and modify it three times. Once to use a while loop, once to use a do...while loop and once to use a for loop.
Program to write: Write a program to do the algebraic equation x = a +a(b+4)/2 multiple times within loops that vary a and b. The variable a should start at 1 go to 10 and increment by 1. The variable b should start at 2 and go to 10 and increment by 2. When you display the answer show the formula in php. I want you to do this three times: once with a for...next, once with a do...while and once with a while.
Week #3
Week of September 18th
We will continue working on information in FirstGroupPHP and SecondGroupPHP and then we will move on to the ThirdGroupPHP and ThirdGroupPlusPHP and BostonTeaPHP. We may get too FourthGroupPHP.
Third Group PHP zipped
Boston Tea party example PHP zipped
Third Group Plus PHP zipped
Please look at "Go West Across America with Lewis and Clark" which is where I got the idea for the Boston Tea Party game. Lewis and Clark adventure
Assignments:
I would like you to write an educational game for kids about some event or series of facts. It should be something along the lines of what I did for the Boston Tea Party. It should have a minimum of 3 pages.
Reference: classtime examples
Decision Quiz
Week #2
Week of September 11th
There are only two people taking this class, so we are essentially doing the course as I did it in the spring. This means you can check the spring audio and Smartboard notes. Hopefully I will catch the references to dates in the spring and fix them, but...
These are the examples we will be using this week.First Group PHP and Second Group PHP under PHP Code Examples at my site.
Please note that we also got to Third Group PHP and Third Group Plus PHP this week.
Comments on some examples
Because a text book is not required, I want to point you to a few good PHP tutorials/ references that you can use throughout the semester. I will also put up sites related to current topics periodically.
Tutorials Point (PHP)
The W3 schools tutorial gives you option to test things
A slow moving basic tutorial
These are the handouts I give out in CIS120 that reference using cisweb. Note we now must use cisweb.bristolcc.edu instead of cisweb.bristol.mass.edu. We will look at login to cisweb this week so check the notes on the Smartboard and the accompanying audio as well as the notes below. To load things up on the Internet, we use WINSCP. Please read the WINSCP and cisweb information: (note that in my examples I use cisweb.bristol.mass.edu as the host, we are now using cisweb.bristolcc.edu as the host although the old one is still supported).
Here is information about using cisweb and WINSCP at BCC
Talks more specifically about portfolio We will be looking at making a portfolio later in the semester.
If you want to download WINSCP at home, you can find it at this address.
WINSCP
Assignments:
For all assignments, send me the address that I can run in the browser to test your program and also send a copy of the code.
In class week 2 quiz (must be done and submitted by all students):
Problem #1: Fix this problem that is made up of fix1.html and fix1.php so that it is running:
Week2fixquizproblem.zip
This includes the third payroll problem from the quiz If you already used the second one to revise, that is fine.
Problem #2: Using payrollbasics3.html and payrollcalc3.php make changes to the php program so that all the code in the body is in one php routine.
Homework: Memo assignment Make up 5 names and use the 7 days of the week. and notice in my example I have you select a first name but I put out the whole name. You can make up the names. Also note that the select is Wed but in the memo I use Wednesday.
Week #1
Week of September 4th
We will start off the semester with a quick review of HTML if needed and then we will actually start the PHP. If you have already had CIS122/44 or have previous experience, this will be a review. If you have taken CIS120/17, you have already been introduced to HTML. For others I suggest that you use resources at the sites for CIS120/17 and CIS122/44 or other resources on the web to accquaint yourself with HTML.
This example covers some of the fundamentals: html5example.html
A great reference for writing HTML is W3Schools
The students in this class have a variety of backgrounds, so for some HTML is review and for others it is relatively new.
Handout on using WinSCP3 Note instead of the host as cisweb.bristol.mass.edu we are now using cisweb.bristolcc.edu.
WinSCP3 is available as open source software and you can download it for home use.
You should be getting a username/password for the BCC site at the end of this week.
We will be working exclusively off the BCC cisweb site. You do not need to install PHP or MySQL, they are on the server.
When we start to look at PHPlog into into cisweb and copied my examples from First Group PHP up to the site. You can find First Group PHP under PHP Code Examples.
Assignments:
If you are new to HTML, I want you to build a web page and upload it to the server (that cannot be done until you get your username and password). The page should include at least list, tables, CSS and forms.
If you are experienced with HTML, I want you to develop a page that challenges you and uses elements that you stretch your knowledge - this is the time to explore more CSS or forms - experiment!
Due the Thursday after it is assigned so due September 14th.
For all assignments and quizzes, send me the address that I can run in the browser to test your program and also send a copy of the code.
Quiz this is one of those quizzes where you can talk things through with others in the class, but each person has to do it and pass in their version.Quiz

Send e-mail to Priscilla Grocer: Priscilla.Grocer@bristolcc.edu

Back to the Top
Return to home page
Return to previous page