My InfinityFree URL

https://cwornor.ifree.page

Responses

  1. Camiryn Wornor Avatar

    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>

    Liked by 1 person

  2. Camiryn Wornor Avatar

    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.

    Like

  3. Camiryn Wornor Avatar

    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.

    Like

  4. Camiryn Wornor Avatar

    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.

    Like

Leave a Reply