Rather than starting a brand new project, I decided to revamp the organized mess that is markUP. I had created markUP with friend in high school for a technology competition 2 years ago. It’s not too shabby for something that was coded and tested for less than 3 months. In deciding revamp this project, I knew I had the daunting task of having to decipher my old, undocumented code.

Issue number one was that I had hosted the site on another server, Freehostia to be exact. My former personal server was being hosted by a family member and I did not have access to any MySQL administration panel to make an additional database. Moving databases wasn’t too difficult of task, but getting to the pages to work again on my current server was a slight nuisance. This was mostly because my skills in debugging MySQL/PHP related errors were quite rusty. That’s what Stack Overflow is for I guess.

In attempting to log in with a newly created account on markUP, I was given this error: Warning: Cannot modify header information - headers already sent... At first glance, I just figured it was a whitespace issue. Sometimes dealing with PHP files can be annoying like that. I abused my backspace key, tried to encode the header file as ANSI – nothing worked. Then I realized I had come across a similar issue with modifying functions.php for WordPress themes a while back.

<?php
    ob_start(); // Initiate output buffer
?>

<html>

...

</html>

<?php
    ob_end_flush(); // Flush buffer output
?>

After finally being able to view the dashboard page, I was welcomed with this: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in... in the area where the student profile links were being printed.

<?php
...
$result1 = mysql_query("SELECT * FROM students ORDER BY name ASC");
while($row = mysql_fetch_array($result1)) {
$result2 = mysql_query("SELECT COUNT(`name`) AS entries FROM data WHERE category = $row[name_id]");
$num_entries = mysql_fetch_array($result2);
echo '<a href="students.php?category=' . $row['name_id'] . '">' . $row['name'] . '</a><br />';}
?>

Turns out of course, $num_entries = mysql_fetch_array($result2); was invalid! Ahh, I had completely forgot the parameters and output of mysql_fetch_array. I’m a very silly girl.

Surprisingly and thankfully, that was the last of my outstanding back-end issues with markUP. There are of course more things I could redo and tune-up. This is why I guess, markUP will continue to be an ongoing project.

On the front-end side of things, the layout and user experience was borderline average. Working as a UI developer at Workopolis has definitely taught me that resolving front-end issues is just as important as fixing up back-end ones. At the end of the day, the clients see the website, not the source code.

UI updates coming soon!

Related Posts:
Developing for Culture
Adding Categories to WordPress Media Items
Torn between design and code

Be bold, take flight - tryangles!