Ok I found some more bugs, you can't use body tag to define the background color of a table, just use bgcolor attribute in table tag, also, you can create a variable, that lets people modify this, so that when they allow cellspacing, they can choose the border color. Also, at the very end of the code, you frogot to close the table row.
Code:
// close it all up
echo("</tr></table>");
// bye!
that way it'll be more browser friendly.