Here is my output php file:
I would like to know where I could add things like adding php inside tables so the layout of the page looks good! I'm not sure how to explain what i want but I would like to have a sort of template for each page but that takes up the whole screen and not just the top of the screen as I currently have.
<?
function do_html_header($title = '')
{
// print an HTML header
?>
<head>
<title><?=$title?></title>
<style>
h2 { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 22px; text-align=center; color = #314671; margin = 6px}
body { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px }
li, td { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 13px }
hr { color: #9EA6BA; width=80%; text-align=center}
a { color: #000000 }
</style>
</head>
<body>
<table width=755 border=0 cellspacing = 0 bgcolor=#FFFFFF>
<tr>
<td valign="top" width="478" rowspan = 4 bgcolor="#FFFFFF">
<p><a href = "index.php"><img src="tastyok.jpg" width="474" height="132" alt="Return to start of booking section"></a></p>
</td>
<td height="46" width="7"></td>
<td valign = bottom width="125" align = right bgcolor="#9EA6BA"> </td>
<td colspan="2" valign="top" align = right rowspan="2">
<? if(session_is_registered("admin_user"))
display_button("logout.php", "log-out", "Log Out");
else
display_button("show_cart.php", "view-cart", "View Your Bookings");
?>
</tr>
<tr>
<td height="2"></td>
<td></td>
</tr>
<tr>
<td height="20"></td>
<td valign = top colspan="2" bgcolor="#333366">
<div align="right" ><font color="#FFFFFF">
<?
$nowunix = time();
echo date("jS F Y");
echo " ";
echo date("H:i:s");
?>
</div>
</td>
<td width="1"></td>
</tr>
<tr>
<td height="70"></td>
<td valign = top colspan="3"><img src="images.jpg" width="269" height="66" align="absbottom"></td>
</tr>
<tr>
<td height="55" colspan="5" valign="top">
<div align="center"><img name="navbartw" src="images/navbartw.gif" width="755" height="34" border="0" usemap="#m_navbartw">
<map name="m_navbartw">
<area shape="rect" coords="657,21,712,32" href="www.pilsbury-krew.co.uk/sitemap.html" target="self" title="Site Map" alt="Site Map" >
<area shape="rect" coords="563,21,605,31" href="www.pilsbury-krew.co.uk/links.html" target="self" title="Links Page" alt="Links Page" >
<area shape="rect" coords="461,21,520,31" href="www.pilsbury-krew.co.uk/contact.html" title="Contact Us" alt="Contact Us" >
<area shape="rect" coords="361,21,424,31" href="www.pilsbury-krew.co.uk/about.html" target="self" title="About Us" alt="About Us" >
<area shape="rect" coords="654,1,740,15" href="http://pub.alxnet.com/guestbook?id=2176699" title="Guest Book" alt="Guest Book" >
<area shape="rect" coords="539,1,630,14" href="www.pilsbury-krew.co.uk/chart.html" target="self" title="Tune Reviews" alt="Tune Reviews" >
<area shape="rect" coords="428,1,517,15" href="www.pilsbury-krew.co.uk/package.html" target="self" title="TW Packages" alt="TW Packages" >
<area shape="rect" coords="348,1,407,15" href="www.pilsbury-krew.co.uk/eventpic.html" target="self" title="Upcoming TW Events" alt="Upcoming TW Events" >
<area shape="rect" coords="280,1,327,14" href="www.pilsbury-krew.co.uk/News.html" target="self" title="News" alt="News" >
<area shape="rect" coords="121,2,259,15" href="index.php" target="self" title="Artists For Hire" alt="Artists For Hire" >
<area shape="rect" coords="5,1,99,15" href="www.pilsbury-krew.co.uk/Main.html" target="mainFrame" title="Home Page" alt="Home Page" >
</map>
</div>
</td>
</tr>
<tr>
<td height="3"></td>
<td></td>
<td></td>
<td width="140"></td>
<td></td>
</tr>
</table>
<?
if($title)
do_html_heading($title);
}
function do_html_footer()
{
// print an HTML footer
?>
<div align="center"><p><font face="Verdana, Arial, Helvetica, sans-serif" size="1">©Tastywet
2001. Simon Gerra Cogs University of Sussex, Falmer, Brighton</font></body>
<?
}
function do_html_heading($heading)
{
// print heading
?>
</div>
</p><h2><?=$heading?></h2>
<?
}
function do_html_URL($url, $name)
{
// output URL as link and br
?>
<p><a href="<?=$url?>"><?=$name?></a><br>
<?
}
function display_categories($procat_array)
{
if (!is_array($procat_array))
{
echo "No categories currently available<br>";
return;
}
echo "<ul>";
foreach ($procat_array as $row)
{
$url = "show_cat.php?procat_id=".($row["procat_id"]);
$stagename = $row["profession"];
echo "<li>";
do_html_url($url, $stagename);
}
echo "</ul>";
echo "<hr>";
}
function display_artists($artist_array)
{
//display all artists in the array passed in
if (!is_array($artist_array))
{
echo "<br>No artists currently available in this category<br>";
}
else
{
//create table
echo "<table width = \"100%\" border = 0>";
//create a table row for each book
foreach ($artist_array as $row)
{
$url = "show_artist.php?memberid=".($row["member_id"]);
echo "<tr><td>";
if (@file_exists("images/".$row["member_id"].".jpg"))
{
$stagename = "<img src=\"images/".($row["member_id"]).".jpg\" border=0>";
do_html_url($url, $stagename);
}
else
{
echo " ";
}
echo "</td><td>";
$stagename = $row["stagename"]." Genre: ".$row["genre"];
do_html_url($url, $stagename);
echo "</td></tr>";
}
echo "</table>";
}
echo "<hr>";
}