Internet
Seminar

Spring 2019
course
site

PHP/SQL Comment System Project Summary


The objective of the project was to design a website with a functioning comment system/message board and login system using php and SQL. In doing so we learned more about how the php and SQL programming languages work, how to interact with information stored in databases, how to utilize databases with SQL, and how most online message boards and login systems work.

What I did:

Although I have far less programming experience than everyone else involved in the project I made an effort to learn enough php/SQL to write and test out some basic components of the project. The things I tried working on were very basic aspects of the project and the things I studied had to be improved upon by my peers to be properly incorporated into the project, but I still feel like it was worth doing the research as I learned most of the bare essentials of SQL as a result.

Things I worked on:

I did a lot of work with things regarding the interface/login system of the website. I tried doing some work on the comment system as well. I ended up contributing the test files I made using XAMPP to the github we used.

Descriptions of the files I made:

login_test:

The first thing that everyone suggested I did was learn how to design a conventional username and password based login system using SQL. I used online sources and examples very heavily, as I have very little experience with using SQL. Here is what each file in the folder is for...

index.php - Displays the login interface when loaded and processes the login info with ( $name = $_POST['realname']; and $pass = $_POST['mypassword']; )

process_form.php - Reads the contents of the stored password file (the correct login info) and compares it to the information submitted by the user (through echoing the data from both files). It assigns the correct info to two variables ($good_name = $text[0]; and $good_pass = $text[1];) and compares the submitted information with the variables. The page informs the user of whether the info is correct or not based on the results.

password.txt - File that contains the correct login info. (Which would normally be stored within the database)

commentbox:

I thought it would be a reasonable idea to submit a sort of prototype comment box interface for us to use on the github, so I decided to do some research on how people write comment boxes using php. Here is what the files do...

index.php - Code for the text input box. The php involved is used to assign times and dates to the comments submitted using (date_default_timezone_set('America/New_York');)

sqlcode.sql - Creates the comments table and would be used to interact with the database.

attachments [paper clip]

  last modified size
TXT README.txt Wed Jul 03 2024 12:23 pm 122B
TXT index.php Wed Jul 03 2024 12:23 pm 458B
TXT password.txt Wed Jul 03 2024 12:23 pm 23B
TXT process_form.php Wed Jul 03 2024 12:23 pm 691B
TXT sqlcode.sql Wed Jul 03 2024 12:23 pm 166B