I am working on this code for php with HTML now i want a container around the information but it is not turning out. Can someone help me understand what I am doing wrong. Should my HTML code suppose to be at the top of the page or not. Here is my code..
<?php
function getContent($page) {
echo "<table width=\"100%\" border=\"0\" cell padding=\"2\" cellspacing=\"\" }\n";
Switch($page){
case "about";
echo "<tr style=\"background-color:#FFFF66\">\n";
echo " <td align=\"center\"> A little about me...</td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<td>Age 26<br>\n";
echo " Gender Female<br>\n";
echo " Bio: I am 26 years old. I am a mother of twin girls who are 9 years old. I been with my husband for 11 years,
but been married for 5 years. I enjoy learning and working on computers. I love to play video games on
the PC. I am going to Stark State College for COmputer Programming and Database Mangament. After I get
done with this degree I am going back for Web Design that should take about a year since half my classes
are of web design now.\n";
echo "</td>";
echo"</tr>";
break;
case "goals":
echo "<tr style=\"background-color:#FFFF66\">\n";
echo " <td align=\"center\"><b>My goals</b></td>\n";
echo "</tr>\n";
echo "<tr>\n";
echo " <td> My goals are to provide for my family after I get out of college.
I want my kids to grow up happy and enjoy their life. I also want
to move to a better neighborhood for my kids.</td>\n";
echo "</tr>\n";
break;
echo " <div id=\"container\">\n";
default:
echo "<tr style=\"background-color:#FFFF66\">\n";
echo " <td align=\"center\"><div><b> Welcome to my page,please choose and interest that you will like.</td>\n";
echo " </tr>\n";
break;
}
echo "<tr>\n";
echo " <td align=\"center\">";
echo "<a href=\"querystringexample.php\">Home</a>";
echo " <br>";
echo "<a href=\"querystringexample.php?page=about\">About me</a>";
echo " <br> ";
echo "<a href=\"querystringexample.php?page=goals\">My goals</a>";
echo " </td>\n";
echo "</tr>\n";
echo "</table>\n";
}
echo "</div>\n";
echo "<html>\n";
echo "<head>\n";
echo " <title>About Me</title>\n";
echo " <style type=\"text/css\">\n";
echo " body { \n";
echo " background-color:#E969AB;\n";
echo " color:#000;\n";
echo " font-size:125%;\n";
echo " font-family:Georgia,Verdana,sans-serif;\n";
echo " }\n";
echo " #container{ \n";
echo " background:#FFF;\n";
echo " width:550px;\n";
echo " margin:auto;\n";
echo " padding:5px 10px 2px 10px;\n";
echo " border:5px double #050833;\n";
echo " }\n";
echo " </style>\n";
echo "</head>\n";
echo "<body>";
getContent($HTTP_GET_VARS['page']);
echo " </body>\n";
echo "</html>\n";