IS669 Extra Credit Assignment You would be surprised how much one can learn by going through someone else’s code, given that it is written professionally. I believe that one can also learn a lot by...

1 answer below »
Please refer to the attached file.


IS669 Extra Credit Assignment You would be surprised how much one can learn by going through someone else’s code, given that it is written professionally. I believe that one can also learn a lot by recreating existing code. This is why the task for this extra credit assignment is as follows: 1. Watch this video: https://www.youtube.com/watch?v=yNolUEBE3Wc&list=WL&index=64&t=2s&ab_channel=FrameworkTelevision This video is a good example of what we have covered so far in class. It shows how to create a simple web-based application, in this case, a goal planner, using php. It also shows how to connect the application with a MySQL database using mysqli. 2. I want you to recreate the code from the video as much as possible. Make sure the functions from the video work using mysqli. CSS part is not required, since we haven’t talked about it in class, yet try to make the application look pretty and with different colors. Keep all the file names the same as in the video-makes it easier for me to grade. Make sure you have the following files functional (complete.php, connect.php, delete.php, index.php, insert_goal.php), see below: 3. Recreate the database in phpMyAdmin, which will store the inputted goals. Again, name everything the same as in the video. See below: 4. Feel free to add one extra function to the application. It can be anything you want, as long as it logically extends the application’s capability. 5. Test that everything works, the application is functional, it is connected to the database, a new entry appears once a new goal is submitted, etc. Upload your work that includes screenshots of the database and application screens from your web-browser, php code, database code and the database file itself. Put everything together in a zip file. This is a pretty straightforward assignment and should not take you more than 2-3 days to complete. The goal of this assignment is to show you how things we have discussed in class connect, flowing logically one into the other. In real life, copy-pasting 100% of someone else’s code is never a good idea.
Answered Same DayNov 30, 2021

Answer To: IS669 Extra Credit Assignment You would be surprised how much one can learn by going through someone...

Sanghamitra answered on Dec 08 2021
160 Votes
goals/complete.php
require_once 'connect.php';
$id = $_REQUEST['id'];
$sql = "UPDATE goals SET goal_complete = '1' WH
ERE goal_id = '" . $id . "'";
if(mysqli_query($link, $sql)){
print ("Stored");
} else {
print("Failed");
}
echo "";
?>
goals/connect.php
$user = 'root';
$password = '';
$db = 'goals';
$host = 'localhost';
$port = '3306';
$link = mysqli_init();
$success = mysqli_real_connect(
$link,
$host,
$user,
$password,
$db,$port);
?>
goals/delete.php
require_once 'connect.php';
$id = $_REQUEST['id'];
$sql = "DELETE FROM goals WHERE goal_id = '" . $id . "'";
if(mysqli_query($link, $sql)){
print ("Stored");
} else {
print("Failed");
}
echo "";
?>
goals/goal.sql
CREATE TABLE `goals` (`goal_id` INT(11) NOT NULL AUTO_INCREMENT ,
`goal_category` VARCHAR(100) NOT NULL ,
`goal_text` TEXT NOT NULL ,
`goal_date` DATE NOT NULL ,
`goal_complete` INT(2) NOT NULL DEFAULT '0' ,
PRIMARY KEY (`goal_id`)) ENGINE = InnoDB;
goals/goals.css
#container{
margin: 10px;
}

.goal {
border: 1px solid gray;
background-color: purple;
color: white;
margin-bottom: 10px;
padding: 10px;
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here