Jump to content

PHP Class Assignment Help


trevka95

Recommended Posts

I don't even know where to start on this project. I'm not a coding major, I'm a business major I do not know why this class is even in my degree plan. Can y'all please help me on this project. I look at the slides and everything and I cannot read this stuff. I'm sorry for complaining, but can I get help on this project. I don't even know where to start. I know we use Notepad++, but as far as that I am truly lost. 

Demonstrate your ability to retrieve information from a database and display it. The results when finished will look similar to that shown in Figure 14.35 .

Figure 14.35 Completed Project 1

Instructions

  1. You have been provided with a PHP page (chapter14-project1.php) along with various include files.
  2. You will need to retrieve information from two tables: Employees and EmployeeToDo. You will need to display the first and last name from every record in the Employee table within an unordered list. The data should be sorted by the LastName field.
  3. Each employee name in the list should be a link back to the same page (chapter14-project1.php), but with the EmployeeID field appended via a query string parameter.
  4. When a request is received with a query string, then the page will display additional information within the Employee Details <div>. In the Address tab group, display the rest of the employee record information. In the TO DO tab group, display the related records from the EmployeeToDo table for that EmployeeID. Sort the EmployeeToDo data by the DateBy field.

Test

  1. Test the page. Verify the links works as expected and that the data is correctly sorted.

 

Link to comment
Share on other sites

If all you understand is how to use Notepad++ then you need to talk to your instructor.

 

The best way you can get help from us is to go as far as you can with the code, then post the code you have and explain the problem you're facing.

Link to comment
Share on other sites

Seems very odd that you would be asked to write code for this plan without ANY previous programming training. Are you sure you didn't skip a pre-requisite or something? It's like getting into a 'business' degree path without knowing arithmetic.

Link to comment
Share on other sites

Welcome to the modern world where software, systems, scripting and programming often figure into just about every aspect of our lives, business being no exception.

 

The first thing you need to do is to put all the files in a location on your computer or server and start looking at them. From the outside I understand it can be very confusing how this all fits together and actually works, but you might be surprised looking at some of the source files, that you might be able to get an idea of how the code works.

 

I'm guessing you have most of what you need, with some holes (a function or 2 perhaps) that are simply missing a small amount of code. It's likely this code involves SQL statements, and perhaps fetching the data and outputting it into an html unordered list (ul). You also may have to surround the list items with an html anchor tag (a href=) and it's telling you that each link will be relative to the same server, so it's going to be something like:

 

echo '<li><a href=/?employeeid=' . $row['employee_id'] . '">' . $row['employee_name'] . '</a></li>';
This is the type of code that is likely going to be the most confusing, because you have to intermix your database results with html markup and the rules for doing that can be tricky if you already aren't on solid ground with html.

 

As Requinix says, things work best here if you've done your best to investigate and understand things, and then when you are stuck or lost, to provide the code you have and ask for specific tips or advice.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.