My InfinityFree URL
Responses
-
Module 4 Assignment
Module 4 assignment has two parts. First we must create your own condition (you can use the if, or if-else condition) in JavaScript and run it on your website. I chose to create a color selector where the user can select either Red, Green or Blue and a color box will be display to match the color the user chose.
I added a module #4 page to my web site at cwornor.ifree.page and simply added an IF condition to the page that shows the color chosen from the select box.
There are 3 colors that can be chosen – Red, Green, and Blue. Choose a color to allow the color-box to switch to the color chosen. When the page is loaded, both the color-box and the select box defaults to Red.
The IF condition JavaScript was easy. The exercise from the class video lectures gave me the idea to keep it simple and use if, else if blocks to decide what color to show when a user selects a color. The CSS was actually harder to align the HTML object than the JavaScript.
The second part of the module 4 assignment was to fix the code in this example and post the result in your blog
<!DOCTYPE html>
<html>
<body><p id=”demo”>Display the result here.</p>
<script>
var greeting;
var hour = new Date().getHours();if (hour < 18) {
greeting = “Good day”;
else
greeting = “Good evening”;
}document.getElementById(“demo”).innerHTML = greeting;
</script></body>
</html>I believe there needs to be curly brackets around the else keyword to make the conditional logic work. The code actually need to look like the one below.
<!DOCTYPE html>
<html>
<body>
<p id=”demo”>Display the result here.</p>
<script>
var greeting;
var hour = new Date().getHours();
if (hour < 18) {
greeting = “Good day”;
} else {
greeting = “Good evening”;
}
document.getElementById(“demo”).innerHTML = greeting;
</script>
</body>
</html> -
Module #5 Assignment
This assignment was two parts. The first part was for me to design my own html form and use the JavaScript principles I learned from the recorded lectures to create a form that takes user inputs and be able to validate those same user input. The second part – which to me was actually the first part – was to create a wireframe of this form and show the wireframe design to my instructor.
I took LIS3361 a few semester ago and in this class we created a resume html website that included a contact me page. It seemed very logical to me that I should add JavaScript validations to this page and use PHP to retrieve data that I store in a database. I created a wireframe for this contact me page and in can be accessed from this link. I also added validations on the Full Name, Email Address, Subject, and Message inputs. The Priority input is optional. It is meant to allow users to indicate the level of urgency they expect I respond with. They can choose to not include any urgency. The Module #5 navigation on the lefthand side of my site is how you access the Contact Me form.
LikeLike
-
Module #6, #7 Assignment
Assignment Part 1
So, for the first part of the assignment. I took the code snippet provided and decided to incorporate it into my resume website (https://cwornor.ifree.page/). It immediately became clear to me that I was going to run into a branding issue. My first few attempts with the PHP page rendered the text perfectly – just to a white background page – black text on a white background. Took me a few hours to locate the (include) statement which allowed me to embed my PHP file into another (parent) PHP file that really just included the html and branding. Voila – my page renders just the want I wanted it to.
Assignment Part 2
Sor the second part – where I am asked to discuss the connection between strings and functions, I start like this: Being able to isolate block of codes into reusable blocks designed to perform specific operations is what makes functions important to code structure. Coding would be very spaghetti-like if functions were not part of programming. Strings act as the primary inputs and outputs of functions. A string is passed into a function, processed via logic and returned as a transformed string. In my opinion, functions would be nothing without string inputs and outputs just as well as the value of a string in programming is enhanced when functions are incorporated in the function code. PHP has string functions like strlen(), str_replace(), str_word_count() – two of which I used in my coding for this assignment.
LikeLike
-
This assignment is a Two Part assignment. For part 1, access my website here. The link to test with is Module #8 on the left hand navigation. I use the PHP POST method to submit a contact me form display the user’s submitted information onto a form results page.
For the second part of the assignment, my response is below:
In PHP, both $_GET and $_POST are global variables used to collect form data after an HTTP request. The fundamental difference lies in how the data is transmitted from the client to the server and the security implications of each method. When a web browser communicates with a server, it uses the HTTP protocol to transmit user input. The two primary methods for this data transfer are GET and POST, which in PHP are the global variables $_GET and $_POST. The fundamental difference lies in where the data is placed inside the network packet and how visible that data remains to the end user.
When a user submits a form using the GET method, the browser takes input name and value pairs, converts them into a single string of text, and appends it to the end of the website’s address bar following a question mark. Because the parameters are completely exposed within the plain-text URL, $_GET is highly transparent but structurally insecure.
The POST method handles information by completely separating the user’s data from the web address. Instead of modifying the URL, a POST request encapsulates the form fields deep inside the hidden message body of the HTTP request packet. Because the data payload travels behind the scenes, the browser’s address bar remains entirely unchanged (clean), hiding the information from onlookers and preventing it from being accidentally saved into the browser’s history or server log archives. This is the more secured approach.
Oh and I also read the reading materials.
LikeLike
-
Module #8 Assignment
Step I
This step was pretty simple. I was able to launch phpMyAdmin and easily create my database. I named my database “cwornor_db” and the system prefaced it with if()_42767651. The database ended up being named if()_42767651_cwornor_db. My intent is to use this database to import contact messages that are sent to me from my resume website contact me page. I am hoping that I can use PHP to insert and update records in this table.Step II
Once I created the database, I then created my contact_messages table. I added 8 variable types to my table. I added full_name, from_email, subject, priority, message, to_email and created variables to the table. I also added an identification (ID) variable that auto-increments to provide a primary key to uniquely identify records for when I need to update a record or delete a record. The ID variable is of type INT, full_name, from_email, subject, priority, and to_email are all varchar, message is a text field, and created is a datetime variable.Steps III
So after I created the table and variables, I inserted a couple of records by clicking the “insert” button on the phpMyAdmin app. I captured the SQL statement that was inserted into my table. This SQL statement inserts two records into my contact_messages table. The SQL statement is the one below:INSERT INTO
contact_messages(id,full_name,from_email,subject,priority,message,to_email,created) VALUES (‘1234’, ‘William Jefferson Clinton’, ‘wjclinton@gmail.com‘, ‘Testing MySQL Insert’, ‘HIGH’, ‘This is a test of my contact messages page’, ‘cwornor@gmail.com‘, current_timestamp()), (‘1235’, ‘Daniel Boone’, ‘explorer@gmail.com‘, ‘Exploring contact messages page’, ‘Medium’, ‘Testing this contact messages page as well’, ‘cwornor@gmail.com‘, current_timestamp())Here is a screenshot of the structure of my table.

Here is the SQL Insert statement I used to insert two records into my table.

LikeLike
-
Module #10 Assignment
For my Module # 10 assignment “Insert Data to MySQL”, I chose to use my module 8 form to capture the data entered on that form and insert the information into a MySQL database I created called if0_42767651_cwornor_db. In this database I created a table called contact_messages. In the contact_messages I added fields that matched the data I am collecting from the form. The fields are full_name, from_email, subject, priority, message. I also added an ID field and a datetime field to track the messages. Finally, I decided to add a HTML table to the Module 10 page to display the records in the table.
My idea is – first, use the left hand navigation to click on the Module 8 link. Enter a contact message and click the submit message button. You should be sent to the message response page to see if your message was captured successfully. Then click on the Module 10 link on the left hand navigation to see that your message was captured in the MySQL table.
Link to my website: My Website (Camiryn Wornor)
LikeLike
-
Module #11 Assignment
I have a few questions that may be important or you may just want to leave it to us to decide.
1. Do we need to show prices on the items being ordered? My choice for my project is a food bank where food is given away versus sold. If I need to show prices then I can adjust.
2. Is it ok to use real organizations in the Tampa Bay area – like Feeding Tampa Bay? – their name, logo and mission? or do we just mimic something similar but fictional?
3. Does the admin side require a login page and actual login accounts stored in the database? I am thinking I just use a single username and password stored in a config file.
4. For the final project submission, are we just submitting the link to our site plus its description in a blog? If not, what else do we need to submit.
5. This link http://nanchyfinalproject.0fees.us/index.php does not work for me. It returns a 404 Not Found error.
LikeLike
Leave a Reply