I am creating a website for local school/community. I want to have a series of templates that users can choose to put their articles into eg. ones with images, some without, images in different locations etc..... I am guessing to have a file with tables which are echoed out in relation to if statements. The data for the template would be in a Database eg. Title, Author, Body,Date,author_email and template id. What I want to know is first does this seem like a sensible way to go round the situation and two: how do I lay out a table which nests an image for example like this:
l;sdhfdsfds
dsfdsfdsfsd
dsfdsfdsfds image here
sdfsfsdfsdf
dsfdsfdsfd
sfsdfsdfdsfdsfdsfdsfdsfdsf
sdfsdfsdhfhghjghdfhgfdgf
dfgkydjskhgl.dlkgljhlhklhjl
This is what I thought for the code:
<?PHP
session_start();
// header
// Do Database stuff
if ($myrow[templateid] == 0)
{
echo out table 0 with data contained in $myrow
}
else
{
if ($myrow[templateid] == 1)
{
echo out table 1 with data contained in $myrow
}
else
{
if ($myrow[templateid] == 2)
{
echo out table 2 with data contained in $myrow
}
}
}
// footer
?>
any suggestions? mainly on the HTML required for the table which flows over 3 quarters.