Comment data for project assignment 2


Save it as a file comment_data.php and include it in your file (use require("comment_data.php")). Alternatively you can copy the file on rynite as

cp ~elenam/public_html/1101_fall06/project_files/comment_data.php .
(this will copy the file into your current directory; don't forget to put a dot after the space).

A script to create arrays from the wp database
Author: Jason Hutcheson
Last Modifed: 3/14/2006

$commentarray = array(
"Noah M. Clark",
"2006-10-04 14:31:31",
"I don't understand this part of the assignment:
\"Your task is to write a PHP program that displays results of voting for two c\
andidates as color bars of three different colors.
We have two canidates, but we need to use three different colored bars? Are we \
supposed to use cell padding, border, etc, etc to make two cells in a table loo\
k like one bar?"),
"2006-10-04 14:49:44",
"I'm confused on question 5. I don't understand how we are supposed to use PHP \
to change the numbers. Do we need to use PHP code in each list itme? I understa\
nd how to change the numbers in HTML but not in PHP. Any advice?"),
"2006-10-04 15:33:50",
"Are we supposed to be using extended URLs for inputting the number of votes on\
 questions 2 & 3? Because the form that tests our programs uses extended UR\
"2006-10-04 18:27:44",
"Noah - it should be TWO color bars, not three (\"three\" comes from an earlier\
 version of this problem, I will correct this shortly). You are supposed to use\
 two separate tables for two candidates and use <strong>width</strong> property\
 of  <td> to set the length of the bar.

Rachael, you are supposed to add php code to each list item and use a varaible \
to set the <strong>value</strong> attribute. You must keep changing the value o\
f the variable  to set the next item number right.
And yes, you are supposed to change the program in questions 2 and 3 to take th\
e numbers of votes as input."),
"2006-10-04 20:04:14",
"I'm having trouble with Questions 1 and 2 of the Problem set.

I don't know how to write the syntax to change the text colors. I thought it wo\
uld be straightforward, but I can't seem to get the hexidecimal notation to wor\
k. For number 2, I'm having problems enabling input from the URL. I've looked o\
ver the examples many times, but I can't seem to get extended URLs to work! I'd\
 appreciate your suggestions.


"2006-10-04 21:40:42",

to set a color (without php variables) you write <code><li style=\"color:  #\
FF00FF\"></code>. To store a color in a variable, you write <code>\$color1 =\
 \"#FF00FF\"</code>. You need to combine these two things in your php code.

As for the input, you need to set <code>\$vote1 = \$_GET[\"input1\"]</code> and\
 the similarly with \$vote2. Then you can use the testing page provided for you\
"2006-10-05 01:05:45",
"Looks like I'll need to change my display name on here, as someone else has my\
 first name... *points upwards, shakes fist, and smiles*"))


The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.