programming 4

Shane0301
cti1101.zip

cti110/coursework/assignments/Files TBD.docx

Files TBD

cti110/coursework/labs/cti110r.css

html { min-width: 742px; min-height: 800px; } body { /*width:800px; */ background-color: #ffffff; margin-top: 0; margin-left: 0; margin-right: 0; padding-left: 20px; padding-right: 100px; border: 0px; vertical-align: top; font-family: Helvetica, Verdana, Arial, sans-serif; color: #333366; } h1 { color: #333366; font-size:2em; font-weight:bold; } h2 { color: #333366; /*#600000; /*663333; /*#336633; /*#3366CC;*/ font-size:1.2em; font-weight:bold; } p { font-size:0.9em; padding-left:25px; padding-right:25px; color: #333366;; } a { color: #660033; /*#CCcc99; /*#ffffcc;/*#CCCC99; /*#336633;*/ font-size:1em; font-weight:bold; } a:link { font-weight : bold; text-decoration : none; color: #660033; /*#cccc99 /*#663333; /*#3366CC;*/ background: transparent; } a:visited { text-decoration : none; color: #660033; /*#cccc99; /*#336633; /*#3366CC;*/ background: transparent; } a:hover { text-decoration : none; color: #cc3300; /*#660033; /*#660000; /*#663333; /*#333399;*/ background: transparent; } a:active { font-weight : bold; text-decoration : none; color: #660033; /*#CCCC99; */ background: transparent; } ul{ margin: 0px; border: 0px; padding-left:25px; padding-right:0px; list-style-type: none; } ul.bullets{ margin: 0px; border: 0px; padding-left:40px; padding-right:0px; list-style-type: disc; } ul.except{ list-style-type:circle} li{ margin: 0px; border: 0px; font-size:0.9em; padding-left:0px; padding-right: 0px; list-style-position: outside; } legend { background-color: rgb(82, 104, 122); color: white; h1 { color: mediumblue; } body { font-family: cursive; }

cti110/coursework/labs/hello-almost-done.html

Hello! You've found the coursework folders!

The remaining Lessons and associated Labs will require you to create a database, query a database and create a program using PHP. You will pull everything together analyzing the IPO. This will require everything from developing the logic/algorithm using Flowgorithm, creating an HTML Form and possible landing page, developing a PHP program to complete the processing requirements and returning the output using HTML.

One of the reasons we learned about HTML Forms is so that you can use this for input. PhP also allows you to do output using HTML as well. You will use PHP to do the processing. In the last lesson we will add the database component as well. For you to test your work you will need to have XAMPP running. You will continue to use your text editor to create your files but now you will test via the URL address for XAMPP localhost.

Since we will be using XAMPP to test our code it is CRITICAL that you save your file in the correct location. Your location should be in similar to: F:\xampp\htdocs\cti110. F: will differ because you may have a different drive letter for you usb. What is important is \xampp\htdocs\cti110.

You will continue to have the same minimum requirement in your code files. Here is a rehash.Each coding exercise will have a Description of your code using the Comment function. Some may be already filled in but may need to be changed to reflect the correct file name and some you will need to annotate. Standard Description Requirement on all coding exercises:

  • Your Name
  • File Name
  • Blackboard Username
  • Class Section: CTI.110.xxx
  • Purpose of Code:

Tips that will help you be successful in remainder of this course:

  • Truly understand the concept of pathing (especially, the difference between a window directory and an URL address.) You can start at Computer Hope -- Path
  • All lab filenames without exception will start with YOUR lastname and then an identifier for the specific lab being completed.
  • Ensure all your files are stored in the correct location so you can create and test your work.
  • When editing your files you will use the windows directory path to save...but you will use the URL address to test. Physically they will be in the same location, however, how the file is accessed determines how the file is handled.
  • It is critical that you have XAMPP up and running. The rest of the course will be dependent on this. If you need help talk to your instructor and/or go to the WTCC ILC for help. DO NOT wait on this!!!

NOTE: You might want to make a copy of your completed coursework in case you make mistakes or something happens since Blackboard will not have backups of those files.

cti110/cti110.css

body { background-color: #eee; /*gray is eeeeee but since all the same can shorten to eee*/ font-family: Helvetica, Verdana, Arial, sans-serif; color: #333366; } #content {padding:10px} header { background-color:#666cff; color:white; text-align:center; padding:10px ; /*padding is 4 sides but if all the same can use one. 20px 20px 20px 20px..is padding top, padding right, padding bottom, padding left*/ margin:10px; } nav ul { padding:5px; font-size:15px; list-style-type: none; margin-top: 5px; overflow: hidden; } li {padding-bottom:5px;} ul.bullet { list-style-type: disc; } nav { width:180px; float:left; /*The float CSS property places an element on the left or right side of its container, allowing text and inline elements to wrap around it. The element is removed from the normal flow of the page, though still remaining a part of the flow */ } .container { background-color: white; margin: 0 auto; /*0 is for top-bottom and auto for left-right. It means that left and right margin will take auto margin according to the width of the element and the width of the container. Centers container*/ /*width:840px;*/ width:800px; } main { padding: 10px; } a { text-decoration:none; color:blueviolet; } h2 {color:darkblue;} footer { clear:both; }

cti110/group/Files TBD.docx

Files TBD

cti110/index.html

CTI 110 Server and Database Guidance

Navigate

What is This Page For?

This is an index page linking to multiple folders within the CTI110 folder. It also contains information about you course work files, recommendations, and how to edit this page. This page is a quick link to your Coursework which includes both Labs and Assignments. It has has a special link to a group folder. In this folder you can save you group work and then test your part of the project. In addition, this page provides links to the PHP Homepage, and W3 Schools website.

Accessing and Testing Your Work

Make sure you have downloaded the files and placed them in the correct location and accessed via a Links URLs. You can also go to them directly with the correct path.

You can test HTML files using your editor or browser but you cannot do an integration test for a web application without a web server and backend programming language. You will be using XAMPP to do this. You will also use XAMPP for databases (mysql/mariaDB) and use PHPAdmin as a GUI frontend to mysql/mariaDB.

For the remaining lessons, you will NEED a working XAMPP install and running to test. When testing, simply type the URL directly, for example:

http://localhost:8082/cti110/coursework/labs/hello-almost-done.html

If you did not change your ports and are using the default port (which is 80) then you would use: http://localhost/cti110/coursework/hello-intro-course.html

Need Help?

How do I work on my coursework files?

There are basic steps to make changes to a file:

  1. Start a text editor
  2. Open the file you want to work on (or create a new file if that's what you want) and rename per the lab naming convention. Generally, this will be lastname-XXXX.ext. These files need to be located in the appropriate folder under your hdtocs/cti110/coursework folder.of your XAMPP installation.
  3. Edit the file as needed
  4. Save the file (usually to the same location)
  5. Now you can open the file in your Web browser to view your changes. To do this either return to this page and click the coursework link above to navigate to the link to your file, or simply type the URL directly in your browser window, for example: http://localhost:8082/cti110/coursework/lab/filename#

Return

How can I edit this page?

You can edit this file to suite your own purposes. It is located in your cto110 folder and named index.html. You may find it useful to add some notes of your own, or you may want to include more links, for example if you create additional folders (see below).

You can also create additional folders if you want to develop your own work. These can be located under the cti110 folder or directly under the htdocs folder. Note that files that are located outside the htdocs folder will not be available for viewing on the Web server unless you change the default document directory settings.

Online Tutorials for help with HTML, CSS, PHP, and many other languages.

Recommendations!

  • Back-up. Make a back up of your work at least weekly to be sure you don't lose code that you have worked hard on! To backup your work, copy your entire CTI110 folder to another disk.
  • If you do not understanding pathing and the difference between url and windows directory addresses look it up!
  • Understand and always ask yourself why you do something. Do not blindly copy.
Return

cti110/samples/add-two-numbers.html

Hey, I can add two numbers!

  • What is the 1st number?
  • What is the 2nd number?
  • Tell me the sum

cti110/samples/add-two-numbers.php

RESULTS "); print ("

$number1 + $number2 = $result.

"); print ("

Return to the Input Form

"); ?>

cti110/samples/cti110.css

html { min-width: 742px; min-height: 800px; } body { /*width:800px; */ background-color: #ffffff; margin-top: 0; margin-left: 0; margin-right: 0; padding-left: 20px; padding-right: 100px; border: 0px; vertical-align: top; font-family: Helvetica, Verdana, Arial, sans-serif; color: #333366; } h1 { color: #333366; font-size:2em; font-weight:bold; } h2 { color: #333366; /*#600000; /*663333; /*#336633; /*#3366CC;*/ font-size:1.2em; font-weight:bold; } p { font-size:0.9em; padding-left:25px; padding-right:25px; color: #333366;; } a { color: #660033; /*#CCcc99; /*#ffffcc;/*#CCCC99; /*#336633;*/ font-size:1em; font-weight:bold; } a:link { font-weight : bold; text-decoration : none; color: #660033; /*#cccc99 /*#663333; /*#3366CC;*/ background: transparent; } a:visited { text-decoration : none; color: #660033; /*#cccc99; /*#336633; /*#3366CC;*/ background: transparent; } a:hover { text-decoration : none; color: #cc3300; /*#660033; /*#660000; /*#663333; /*#333399;*/ background: transparent; } a:active { font-weight : bold; text-decoration : none; color: #660033; /*#CCCC99; */ background: transparent; } ul{ margin: 0px; border: 0px; padding-left:25px; padding-right:0px; list-style-type: none; } ul.bullets{ margin: 0px; border: 0px; padding-left:40px; padding-right:0px; list-style-type: disc; } li{ margin: 0px; border: 0px; font-size:0.9em; padding-left:0px; padding-right: 0px; list-style-position: outside; } label { display:block; margin-bottom:.2rem; } input { margin-bottom:.3rem; } button { margin-top: 1em;} } legend { background-color: rgb(82, 104, 122); color: white; } h1 { color: mediumblue; } body { font-family: cursive; }

cti110/samples/welcome.html

Welcome!

User Information What is your first name? What is your last name? Interest Tell me something that you are interested in: Tell me something else that you are interested in: Tell me one more thing that you are interested in: Birth Info Please select your birth month: 1 2 3 4 5 6 7 8 9 10 11 12 And birth day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Submit Data

cti110/samples/welcome.php

Welcome $firstName $lastName!"); else if (!empty($firstName) ) print ("

Welcome $firstName!

"); else if (!empty($lastName) ) print ("

Welcome Somebody $lastName!

"); else print ("

Welcome Whoever You Are!

"); switch ($birthMonth) { case 1: $month = "January"; break; case 2: $month = "February"; break; case 3: $month = "March"; break; case 4: $month = "April"; break; case 5: $month = "May"; break; case 6: $month = "June"; break; case 7: $month = "July"; break; case 8: $month = "August"; break; case 9: $month = "September"; break; case 10: $month = "October"; break; case 11: $month = "November"; break; case 12: $month = "December"; break; } if (($birthMonth == 2 && $birthDay > 29) || ($birthMonth == 4 && $birthDay > 30) || ($birthMonth == 6 && $birthDay > 30) || ($birthMonth == 9 && $birthDay > 30) || ($birthMonth == 11 && $birthDay > 30) ) print("

Hmmm ... $month $birthDay ... you seem to have been born on a day that doesn't exist!

"); else { if (($birthMonth == 12 && $birthDay >= 22) || ($birthMonth == 1 && $birthDay = 20) || ($birthMonth == 2 && $birthDay = 19) || ($birthMonth == 3 && $birthDay = 21) || ($birthMonth == 4 && $birthDay = 20) || ($birthMonth == 5 && $birthDay = 21) || ($birthMonth == 6 && $birthDay = 21) || ($birthMonth == 7 && $birthDay = 23) || ($birthMonth == 8 && $birthDay = 23) || ($birthMonth == 9 && $birthDay = 23) || ($birthMonth == 10 && $birthDay = 23) || ($birthMonth == 11 && $birthDay = 22) || ($birthMonth == 12 && $birthDay Hmm, born on $month $birthDay .. I guess that makes you $sign "); } if ( !empty($interest1) && !empty($interest2) && !empty($interest3) ) $interests = "three interests: $interest1, $interest2 and $interest3."; elseif ( !empty($interest1) && !empty($interest2) ) $interests = "two interests: $interest1 and $interest2."; elseif ( !empty($interest1) && !empty($interest3) ) $interests = "two interests: $interest1 and $interest3."; elseif ( !empty($interest2) && !empty($interest3) ) $interests = "two interests: $interest2 and $interest3."; elseif ( !empty($interest1) ) $interests = "one interest: $interest1."; elseif ( !empty($interest2) ) $interests = "one interest: $interest2."; elseif ( !empty($interest3) ) $interests = "one interest: $interest3."; else $interests = " .. that you don't have ANY interests! Are you sure? "; print("

What else did you say about yourself .. You indicated $interests I hope that you find this course interesting, and useful, and that you find ways to apply what you learn to your personal goals.

"); print ("

Return to the Welcome Form

"); ?>

cti110/sql/Files TBD.docx

Files TBD