x--------x

PUSHING AND UPDATE TO REPO ONCE SAVED:

GET INTO GIT: cd /c/xampp/htdocs/judsonsclocks

1. git status
2. git add (filename) or git add . (for all files)
3. git commit -m "short message goes here"
4. git push
5. git push --set-upstream origin [branch-name] (only if its the first time pushing or you set up a new branch)

x--------x

Day 4:

Project Goal: Reorient with CSS packages, finish yesterdays videos with CSS, do some more hands-on work with CSS, look into bootstrap, get a fully-functional style file and integrate accross all webpages, generate code for the structure of incomplete pages

Tidbits:

Work Log:

- fixing button link on home page
- troubleshooting mysql database --> localhost user privilege issue
- researching
- exporting mysql database and structure, creating a separate project folder for the localhost variant
- figuring out how to ensure db.php script can actually detect the different environments instead of hardcoding and/or creating a seperate directory/project folder
- adding php script to differentiate between local and server-hosted env
- uploading mysql database to localhost/myphpadmin
- entering xampp shell to initialize local mysql database
- using mysql to recreate original table and inserting it into the localhost version of the mysql database
- reading bootstrap documentation
- generating a test html homepage and new style sheet for the localhost to expiriment
- linking
- creating folder directories for the test html and css pages
- troubleshooting more directory issues
- generating comprehensive CSS stylesheet
- localhost server refuses to load correct version of files even after ensuring directory is correct? why?

*** fixed issue--genuinely unsure of what happened. It seems like the changes weren't on the server and after I reset Apache and MySQL from Xampp, it decided to wipe some of the changes I had just made to the test_local_homepage.html file, so then I discovered the error (or chatbox did) once I was at a loss and pasted the entire HTML file into Chatbox to see if it could find the problem. I had done this before and the correct link was there. I can say this is for certain since I actually tried removing an entire button from the main page's HTML and it wouldn't update on the server which was just bizarre.

*** Real message sent to a friend:

"im mad because i wanted to do some css and css framework stuff today ( i mean i will for the next hour i still have time ) but so much of the last 2 days has just been me trying to figure out how to get xampp, the localhost / myphp admin garbo, and the myphpadmin inside of namecheaps c-panel to basically just recognize shit
[3:05 PM]
make scripts actually connect to the databases they are referring to
[3:05 PM]
and generally speaking get my folders and directories organized so that when I update something it actually automatically reflects on the localhost
[3:05 PM]
and trying to generate and connect different stylesheets
[3:05 PM]
i feel like any other person would have had this done in 59 minutes max"

- getting hands-on experience with html structure and design as well as modifying links, creating webpages and editing CSS styles
- really having fun with how easy it is to make changes using CSS and how much it makes sense: it's really just lining up, basically in chronological order (though I'm not exactly sure how 'best-practice' this is' elements in the HTML structure with the corresponding 'blocks' in the splitscreen CSS file
- merging old webpage with new webpage code
- troubleshooting
- removing underlining from buttons
- adding margin spacing for visual appeal
- managed to incorrectly duplicate two different homepages (how)

*** I now have a /judsonsclocks and a /JudsonsClocks showing up in my localhost directory, with two different stylesheets applied, which is really, really strange.

*** The issue literally fixed itself. What. Perhaps it correlated with my deletion of an empty vscode workspace?

- figuring out how to create an actionable theme template based on some existing CSS colors and styles I already have pre-generated and applying them loosely to other pages in the future
- customizing form box and adding CSS
- tweaking and customizing box, padding, styling
- editing buttons
- fixed add_post.html redir
- getting crazy, silly and quirky with the blog.php display page. generating with exquisite instructions & detail. will customize
- fixing redirect link for add_post.html
- LOOKING GREAT RIGHT NOW!!

*** Ran into a bizarre error. When clicking on 'blog' from the navbar of the existing blog page, it tries taking you to: "http://localhost/JudsonsClocks/blog/blog/blog.php" Blog blog blog. Why is it trying to infinitely go down into the page and open up new /blog/blog.php urls? Weird.

- making each individual post fully clickable:
-> modifying link loop in blog.php to generate an ID based on the post
-> creating post.php webpage to display individual posts

*** Food for thought: "Security: The above post.php example directly uses $_GET['id'] in the SQL query, which can be vulnerable to SQL injection. To enhance security, consider using prepared statements with parameter binding for your SQL queries."

*** Food for thought: "URL Rewriting: For a cleaner URL structure (e.g., http://localhost/JudsonsClocks/blog/post/1 instead of http://localhost/JudsonsClocks/blog/post.php?id=1), you might explore URL rewriting techniques, which can be achieved with .htaccess in Apache or similar configurations in other web servers. This step is optional and more advanced."

- fixing broken theme for blog.php
- unsure of current issue: theme seems to be in place but something is not loading properly
- there seems to be some kind of discrepency between what's specified as applying to the .content class in the blog.php file and what's supposed to be applied to it in the style.css file
- found overlap issue (or also an oversight issue) based on class titles that I thought were being properly used--namely .post and post-xyz, where .post is for the post.php file but post-xyz (and other classes) are supposed to affect content displayed on the blog.php file
- editing post.php file to maintain aesthetic continuity with other pages: blog.php, index.php, etc.
- removing link capability on post titles when already viewing an individual post
- generating contact page and submission form