Wow. that was fantastically frustrating.
I tried to see if Western's homepage servers would allow PHP, and of course, they don't. I tried to use their premade functions and tutorials to achieve my needs, and of course the links are nonfunctional and what code they do provide results in an internal server error. How frustrating.
I emailed the help desk, so I'll get a response..probably by February or so. I uploaded the files, less the SQL database file, on my site, but you'll need WAMP server software to do anything with them.
I am currently looking for a new hosting place for my stuff, one that allows mySQL and PHP. Kyle, this is mostly directed to you, but I'd love some help.
Grade Update:
Accounting
Exam: 81.67%
Final Grade: BA
CS 2800
Exam: 81%
Final Grade: TBA
Monday, December 15, 2008
Sunday, December 07, 2008
Thursday, December 04, 2008
I had another stupid mistake. Where I posted before, the column names need to be referenced by 'lastName' and 'firstName' and so on and so forth. Like this:
$row = mysql_fetch_assoc($result);
do {
print("{$row['ID']} ");
print("{$row['ISBN']} ");
print("{$row['Category']} ");
print("{$row['Title']} ");
$row = mysql_fetch_assoc($result);
} while($row);
?>
$row = mysql_fetch_assoc($result);
do {
print("
print("
print("
print("
$row = mysql_fetch_assoc($result);
} while($row);
?>
Okay. So, the previous error was actually pretty straightforward. in PHP, concatenation is done by . , so for example, a string with a value (such as what I had before) is done like so:
("stringData".$phpVariable."more string data")
So (fixed in previous post) I needed static references to the columns, which are `firstName` and `lastName`. Now, I have a situation where everything goes through, but my output is not displayed, but it gets the right amount of data entries. Just have to see where I'm screwing up in this tidbit:
$row = mysql_fetch_assoc($result);
do {
print("{$row['`eMail`']} ");
print("{$row['`firstName`']} ");
print("{$row['`lastName`']} ");
$row = mysql_fetch_assoc($result);
} while($row);
?>
Post when I figure it out.
("stringData".$phpVariable."more string data")
So (fixed in previous post) I needed static references to the columns, which are `firstName` and `lastName`. Now, I have a situation where everything goes through, but my output is not displayed, but it gets the right amount of data entries. Just have to see where I'm screwing up in this tidbit:
$row = mysql_fetch_assoc($result);
do {
print("
print("
print("
$row = mysql_fetch_assoc($result);
} while($row);
?>
Post when I figure it out.
Wednesday, December 03, 2008
So:
extract( $_POST );
// build SELECT query
//NOTE: This is where we're throwing an error, somehow. I think.
$query = ("SELECT `firstName`, `lastName` FROM `users` ORDER BY `lastName` DESC");
// Connect to MySQL
if ( !( $database = mysql_connect("localhost", "root") ) )
die( "Could not connect to database
extract( $_POST );
// build SELECT query
//NOTE: This is where we're throwing an error, somehow. I think.
$query = ("SELECT `firstName`, `lastName` FROM `users` ORDER BY `lastName` DESC");
// Connect to MySQL
if ( !( $database = mysql_connect("localhost", "root") ) )
die( "Could not connect to database