Posts

Module 11: Final Project Overview

For Module 11, the focus was on understanding the requirements for our final project, which combines everything we’ve learned throughout the course. The goal is to design and create a website that promotes and supports a local charity or volunteer organization. The project includes two main parts: the public front-end , which focuses on layout, visuals, and user experience, and the administrative back-end , which handles the functionality, things like data collection and connecting to a MySQL database through PHP. At this stage, the professor asked us to review the project instructions and post any questions we might have. Many students mentioned the broken example link and asked about domain setup and the level of complexity expected for both the front-end and back-end. Personally, I don’t have any major questions, as the requirements seem pretty clear. I plan to continue using my existing InfinityFree domain and simply create a new section or page dedicated to the final project. Tha...

Module 10: Inserting Data into MySQL with PHP

Link to my site:   http://drew-williams.infinityfree.me/Module10.html For this module, I connected my PHP code to my MySQL database on InfinityFree and used a basic HTML form to insert new records. The goal was to take data submitted from the form and insert it into the table I created in Module 9. I built a simple form that collects a user’s first and last name and sends it to a file called insert.php . Inside that file, I used PHP’s MySQLi extension to connect to the database. Once connected, I used a basic SQL statement to insert the form data into the users table. After uploading the files to my InfinityFree htdocs directory, I was able to submit data from the form and see the new record appear instantly inside phpMyAdmin. The easiest part was creating the form itself, the HTML side is always straightforward. The trickier part was confirming the exact credentials from InfinityFree (server name, username, password, and database name) since each one needs to match exactly. Once...

Module 9: Creating My First MySQL Table

For this module, I worked inside InfinityFree’s control panel and phpMyAdmin to create my first MySQL table. This was a simple assignment, but it’s a key piece of understanding how PHP and databases connect later on. My database is named module9_db , and I built a table called users with an auto-incrementing ID and two text fields for first and last names. Step 1 – Creating the Database I started in my InfinityFree account under MySQL Databases and clicked Create New Database . InfinityFree automatically adds its account prefix, so the final name looked like if0_39835771_module9_db. The process itself was straightforward, no configuration needed beyond giving it a name. Step 2 – Designing the Table in phpMyAdmin Next, I opened phpMyAdmin from the panel to design the table. I named it users and added three fields: id – INT(11), set as the Primary Key and Auto Increment firstname – VARCHAR(50) lastname – VARCHAR(50) Choosing the right data types was the main point here. INT is used for ...

Module 8: PHP Forms and GET vs POST

Link to my site:  http://drew-williams.infinityfree.me/Module8.html For this module, I created an HTML form that collects a user’s first name, last name, and email address. When the form is submitted, it sends the data to a PHP file on the server, which then displays the submitted information back on the page. I used the POST method for this form because it’s more secure and better suited for sending user input that shouldn’t be visible in the URL. I also reviewed the difference between $_GET and $_POST in PHP: $_GET sends data through the URL. You’ll see the variables appear in the query string, like  ?fname=Drew&lname=Williams . It’s fine for search queries or simple data you don’t mind being visible. $_POST sends the data in the body of the HTTP request, so it doesn’t appear in the URL. This makes it better for things like login forms or sensitive data. In my project, the PHP handler uses  $_POST  to grab each value, the...

Modules 6 & 7: PHP Functions and Strings

 Link to my site: http://drew-williams.infinityfree.me/Module7.php For these modules, I created a short PHP page that demonstrates both a custom function and a few string operations. I’ve used PHP before, but it was nice to revisit the basics and set something up from scratch on a hosted server. The function I wrote is called greet(). It takes a first and last name, combines them into a full name, and returns a greeting in uppercase. It’s simple, but it covers the main points from the assignment: parameters, concatenation, returning a value, and using a built-in string function (strtoupper()). Here’s the part I like about PHP, even though it’s an older language, it’s still extremely direct when you just want to manipulate text and send a response to the browser. For the strings part, I included a few examples using built-in PHP functions: strlen() to count the number of characters in a sentence, str_word_count() to count the words, and strpos() to locate a specific word in the stri...

Module 5: JavaScript Validation and Wireframe Design

Image
Link to my site:   http://drew-williams.infinityfree.me/Module5.html For this module, I worked on both web programming and web design. Web Programming: I created my own HTML contact form with fields for name, email, and age. To make it more interactive, I wrote a JavaScript validation script. The script checks that the name field is not empty, the email contains an “@” symbol, and the age entered is 18 or older. If the inputs don’t meet these conditions, the form displays error messages in red. If everything is valid, it shows a green success message. The easy part of this task was creating the basic form structure with HTML. The more challenging part was writing the validation logic so it gave clear and specific feedback for each error. Once I got the conditions right, it was satisfying to see the form respond dynamically when testing different inputs. Web Design: For the design portion, I created a wireframe that simply shows the current structure of my website, you could also ...

Module 4: Web Programming and Web Design

Image
Link to my site: https://drew-williams.infinityfree.me/Module3.html For the web programming section, I created my own JavaScript if/else condition. My script checks the current day of the week and then displays a different message depending on whether it’s a weekday or the weekend. The easy part was writing the basic structure of the condition. The harder part was remembering that getDay() returns numbers (0–6) instead of text like “Monday” or “Tuesday.” Once I figured that out, the condition worked correctly and displayed the right message on my page. I also fixed the broken example code from the assignment. The original code had the else statement placed incorrectly. After adding the missing curly brace, the script now runs properly and displays “Good day” before 6 PM and “Good evening” after 6 PM. For the web design section, I used Canva instead of Photoshop to create a simple test image. I downloaded it in JPG format. The process was pretty easy in Canva since it lets you export...