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.

If you contact me and we work out a plan, I will accept a few things over the weekend of May 11th and May 12th.

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. Remember that I record/tape all my classes and capture notes on the Smartboard. These are available to you under Audio and Smartboard.
Final Exam Your final must be emailed to me by Thursday, May 16th at 9:00AM. You must also send the required status sheet either with the exam or prior to the exam.
Final Exam
Required status sheet
Week #14/#15
Week of April 29th/May 6th
Tuesday will be the last day of new material classes. Thursday will be an open lab. Next week will also have open labs on Monday, Tuesday and Thursday.
Thursday, May 2nd will be an open lab from 9:30 until 6. I will be there most of the time as will Lindsey.
Monday, May 6th will have an open lab from 11:00 until 4:00 with me the first part and Lindsey after 2.
Tuesday, May 7th will have an open lab from 9:30 until 3:00 with me.
Thursday, May 9th will have an open lab from 9:30 until 6:00 with me there until 3:00 and Lindsey until 6:00.
Dave will be available 4:00 until 9:00 on Tuesday, May 7th and Wednesday, May 8th.
This week we will continue with email and also look at cookies and sessions.
Email Group Two PHP zipped
cookies session zipped
SessionsGuess.zip
More on session guess games As always, check back.
Assignments:
First: Make a email using html and php. It should include an image, color and several different html features.
Second: Set up a database table with idno, name, email and major. Send an email to everyone in the database. Clearly I should be in the database.
Please test sending it to yourself and only send me the email when it is working - you need to send it to my BCC email and my usual homework email address. Third: Inside Sessions Guess there is a program called registration.php that I want you to explain.
Fourth: I want you to write a program that uses sessions to take in information and display it on another page.
C heck back!
Week #13
Week of April 22nd
I will be around Tuesday and Thursday when I do not have advisement at 2ish. Lindsey is available Thursday 2-6. Dave will be available 4:00 - 7:00 on Tues and Wed and 10:30 -2:30 on Saturday. Jayson (from the tutoring center) is available 9-12 Tues in New Bedford.
We will look at images and email.
Images Second Group PHP zipped
Email Group One 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 #12
Week of April 15th
I will be around Tuesday and Thursday when I do not have advisement at 2ish. Lindsey is available Thursday 2-6. Dave will be available 4:00 - 7:00 on Tues and Wed and 10:30 -2:30 on Saturday. Jayson (from the tutoring center) is available 9-12 Tues in New Bedford.
We will continue with arrays and then move on to images if we have time.
Array Group Third PHP zipped
Images First Group PHP zipped
Check back! Assignments:
Sorry, been having server problems!
A few more arrays
Week #11
Week of April 8th
I am available at 10 in K112. I will be around Tuesday after class. Lindsey is available 2-4 on Monday and Thursday 2-6. Dave will be available 4:00 - 7:00 on Tues and Wed and 10:30 -2:30 on Saturday. I will be available at 2 on Tuesday (but double check). Jayson (from the tutoring center) is available 9-12 on Mon and Tues in New Bedford.
On Tuesday at 11:00 in K101, a group of CIS graduates who are working in IT will come to class to talk about their work and answer questions. You are invited to attend.
Array Group First
Array Group Second PHP zipped
The last day for student withdrawal is April 11th. Let me know if you have questions.
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.
Dave said there is a lot of confusion so here is something that might help... So there should be one array that has messages in it: Multiply by 0, Multiply by 1 etc. Every time you change to multiply by a different number, you display one of them. Then you are going to set up a loop with i and j or x and y whatever. To get the answer you want to display you need to go to a two dimensional array that contains the answers and extract them using the i and j or x and y or whatever. So for the first problem i is 0 and j is 0 so you use those to go to the two dimensional table and extract the answer of 0. For the last problem k is 4 and j is 4 so you use those to go to the two dimensional table and extract the answer of 16. It is kind of like extracting the miles from one city to another using two indexes (from city and two city). Here you are using two indexes that are the two numbers you are multiplying.
Check back!
Week #10
Week of April 1st
I am available at 10 in K112. I will be around Tuesday after class. Lindsey is available 2-4 on Monday and Thursday 2-6. Dave will be available 4:00 - 7:00 on Tues and Wed and 10:30 -2:30 on Saturday. I will be available at 2 on Tuesday (but double check). Jayson (from the tutoring center) is available 9-12 on Mon and Tues in New Bedford.
We will look at taking in and processing data in the same page and updates.
FunctionGroupPHP.zip
FunctionsBuiltinGroupPHP.zip
UpdateFunctionPHP.zip
Assignments:
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. I suggest you use my update as a model to create one of your own with a different table. You can also decide to write one from scratch. If you do both, I will give you extra credit. If you need some extra time on this, let me know.
Functions
Check back!
Week #9
Week of March 25th
I am available at 10 in K112. I will be around Tuesday after class. Lindsey is available 2-4 on Monday and Thursday 2-6. Dave will be available 4:00 - 7:00 on Tues and Wed and 10:30 -2:30 on Saturday. I will be available at 2 on Tuesday (but double check). Jayson (from the tutoring center) is available 9-12 on Mon and Tues in New Bedford.
We will continue with connections this week.
Assignments:
Third Connect Group Assignment
Check back!
Week #8
Week of March 18th
Thursday is an open lab day from 9:30 or 10:00 until 6 in K101. Come for as many hours as you can and work to get caught up with Lindsey or myself to answer questions.
I am available at 10 on Monday in my office K112 and Tues at 2:00 in K101/K112. Lindsey is available 2-4 on Monday and 10-12:30 and 2-6 on Thursday. Dave will be available Tues and Wed from 4-7 and on Saturday from 10:30 to 1:00. Jayson (from the tutoring center) is available 9-12 on Mon and Tues in New Bedford.
We will continue looking at connection. Possibly we will start the Third Connect Group.
Third Connect Group
Assignments:
PHP connect quiz
Check back!
Vacation
Week of March 11th
Dave is available for help on Tues and Wed from 4-7 and Sat from 10:30 to 2:30. He will probably be in K101 or K118 but if not, the help desk will know where he is.
Week #7
Week of March 4th
I am out sick on 3/5/19. Lindsey is available 2-4 on Monday and Thursday 2-6. Dave will be available 4:30 - 7:30 on Tues and Wed and 10:30 -2:30 on Saturday. I will be available at 2 on Thursday (but double check). Jayson (from the tutoring center) is available 9-12 on Mon and Tues in New Bedford.
We will look a little more at relational databases and then move on to linking MySQL into PHP.
We will finish up our quick introduction to MySQL and using SQL and start incorporating it into PHP.
First Connect Group zipped
Connect Explanation
Second Connect Group OK
Assignments:
First assignment: Get connected to the database from within your PHP program and display information from the database in two different ways. See my examples.
Second assignment: MySQL PHP assignment
Week #6
Week of February 25th
I am available at 10 on Monday in my office K112 and on Tues and Thurs at 2 in either K101 or K112.. Lindsey is available 2-4 on Monday and 2-6 on Thursday. Dave will try to be available on Saturday from 10:30 to 2:30 on Saturday (he has some family health problems). Jayson (from the tutoring center) is available 9-12 on Mon and Tues in New Bedford.
We will move on with our overview coverage of SQL within MySQL.
Notes (some of which may be next week):
Keys, indexes etc.
Subqueries
Multiple tables
Functions
Assignments:
workingwithSQL.doc Play computer (do not actually run) and show me the output that would be produced.
SQL Assignment 2
Week #5
Week of February 18th
I am available at 2 on Tues and Thurs. Lindsey is available 2-4 on Wednesday (Monday classes) and 3-6 on Thursday. Dave is available 4-7 on Tues and Wed and 10:30 to 2:30 on Saturday. Jayson (from the tutoring center) is available 9-12 on Mon and Tues in New Bedford.
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
Assignments:
Select try
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.
Check back!
Week #4
Week of February 11th
I am available at 10 on Monday and 2 on Tues and Thurs. Lindsey is available 2-4 on Monday and 3-6 on Thursday. Dave is available 4-7 on Tues and Wed and 10:30 to 2:30 on Saturday. Jayson (from the tutoring center) is available 9-12 on Mon and Tues. Think about setting up study groups when Lindsey and David are available. We will start out by looking at GroupThreePlusPHP Boston Tea Party and GroupFivePHP.
Third Group Plus PHP zipped
Boston Tea party example PHP zipped
Fifth Group PHP zipped
Next we will start looking at MySQL.
In using these notes remember that the port is now 220.
Beginning MySQL notes
MySQL and putty
Using Putty in MySQL as of Feb 16,2016
I heard back from Eric and apparently we are now using MariaDB instead of MySQL at the prompt. However they changed the prompt back to MySQL so...
Experiment with MySQL please.
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 4 pages.
Develop a table with at least 5 fields and at least two different types. Populate the table and then do five different queries using ANDs and ORs.
This is the if statement assignment that I originally put under week 2 and a lot of you have already done it. if not it is showing up now.
IF Assignment
Week #3
Week of February 4th
I will be available Monday at 10 in my office K112 and Tuesday at 2 in K101. Lindsey will be available 0n Monday from 2-4 and Thursday from 2-6, Dave is available Tues and Wed from 4-7 and Sat from 10:30 to 2:30.
There is a lot of support and you should definitely use it if you have questions or encounter a problem. We are hear to help you succeed! Please take advantage of that.
To repeat: If you need help with something, now would be the time to ask your questions!
We did not make it to group three, we will do that this week. It is posted under week 2. You can find Third Group PHP at Third Group PHP
Fourth Group PHP zipped
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 #2
Week of January 28th
I will be available for help Monday at 10:30. At 2:00 Tuesday and Thursday there will be a help lab in K101 (we hope - may have to find a different room) with either me or Lindsey (my SI and tutor). Lindsey will also be available 2 -4 on Monday in K101 and on Thursday from 2 - 6 (I need to check the room). Dave will be available from 4 to 7 on Wed and Saturday from 10:30 until 2:30 in K101. Room numbers are not definite, the help lab will know where Lindsey and Dave are.
We will continue with PHP looking at Second Group PHP and Third Group PHP. You can find Second Group PHP at Second Group PHP
You can find Third Group PHP at Third Group PHP
Below is a presentation on the structure of IF statements.
Presentation on logical if structures - review
    Separate speaker notes to accompany presentation on logical if structures
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
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:
IF Assignment We did not get as far as I hoped in IF statements so this will be put up under next weeks assignments. You can look at the examples for ThirdGroupPHP and start working on them if you want to get ahead.
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 January 21st
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 cisweb and copy my examples from First Group PHP up to the site.
You can find First Group PHP at First Group PHP revised - a few things have been added
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 the week it is assigned so due January 31st.(Note that homework is always due the Thursday of the week after it is assigned unless I give a specific due date - usually because I want to go over the assignment).
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.
Check back after we have held a class

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

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