CSCI 2910-001 Project 2 FAQ

The following is a list of some of the questions that people have asked me regarding Project 2. Check back here occasionally to see if I have added more answers (they'll be added to the end of the list.) E-mail me if you have any additional questions you would like to see posted to this site.

When is the due date?

The project is due the Friday before finals, i.e., April 28th

How do I turn in my project?

I cannot use FTP to access the files contained in your Einstein folders (I do not have the correct administrator privileges), and if I access them through a URL in a browser, the PHP engine on Einstein processes the PHP script and I cannot see it to grade it. Therefore, you must either submit your project files to me using the Blackboard dropbox or as an e-mail attachment. Either way, it would be nice if you could compress and archive them using something like PKZIP.

Can I get another copy of the database discussion handout?

Yes. I have posted a PDF of the database discussion handout here.

What do we need to submit for the final project?

A full project submission will include the following:

On what will the final grade be based?

Like project 1, your grade will be based on a number of things including:

When entering a new person in the database, how do you verify a correct association between that person and their parents if the parents already exist in the database?

There is a potential problem when trying to add a person to the database using a form. When prompting the user for a father or mother who already exists in the database, you need to insure that the correct person is identified. For example, a minor misspelling could cause your system to incorrectly generate a new person in the database. There might also be a problem if more than one person with the same name existed in the database, and your code might associate the wrong one as a parent.

One solution might be to have a drop down box allowing the user to select from an existing person in the people database. Another solution is to have a second page appear after a user enters a new person. This second page might display all of the people from the database who have a similar name, then ask the user to either select one of them or generate a new record.

Do we need to make a different HTML page for each person?

No. The purpose of this assignment is to create a single PHP script that will access a record within the database to be displayed as a page describing a person.

How do we create a link for a person that will call a PHP script to display that person's page?

There are a number of ways to do this, but I think that there is one that is preferred above the rest. Remember that a form that uses the get method sends the data to the URL as part of the URL. Take for example the form below.

<form method="get" action="http://einstein.etsu.edu/~tarnoff/process.php">
    <input type="text" name="text_1" value="data" />
    <input type="submit" />
</form>

When the submit button is pressed, the URL requested becomes http://einstein.etsu.edu/~tarnoff/process.php?text_1=data. This can be simulated using a simple anchor tag defining a link. For example, let's say that you've set up an id for each person in the database. Assume that "John Smith" has an id of 183. This means that the link you put for John Smith in your navigation page could look like:

<a href="getpage.php?id=183">John Smith</a>

In your getpage.php script, you can access the id using the $_GET array with $_GET[id]. This will tell you which person to retrieve from the person table.

How pretty does my page need to be?

It needs to have a style. Since this is not a course on design theory, I am not going to be critical of the style elements you use. At a minimum, you should have a style sheet that defines colors and fonts for all of your page elements. If you can't come up with a style on your own, adapt one from one of your favorite sites. (Please no direct copies of CSS files from other sites.)