I am bidding on a project that was coded completely in php with basic tables containing the data. My job is to make the site look pretty. I am a designer and I can *read* the php, but am not the person to generate or tweak code.
I can generate the CSS styling to do the bulk of the design, but am running in circles trying to figure out how to style this output successfully:
[code=php]
<?
$sql = "select * from masterCategory" ;
$masterResult = mysql_query($sq l);
while ($mr = mysql_fetch_arr ay($masterResul t)){
echo " &n bsp;   ;";
echo "<font color=\"#FFFFFF \" size=\"+1\">".$ mr["name"]."</font><br>";
$sql = "SELECT * FROM category where masterid = ".$mr["id"]." ORDER BY id";
$result = mysql_query($sq l);
While($r = mysql_fetch_arr ay($result)){
echo " &n bsp;   ;";
echo "<A href=\"preview. php?cat=".$r["id"]."\">".$r["name"]."</A><br>";
}
echo "<br>";
}
?>[/code]
[Please use CODE tags when posting source code. Thanks! --pbmods]
The client determines the mastercategorie s (3 at the moment) and there are varying numbers of names under each mastercategory.
Here is the way I would like it to look:
Master 1
some1
some2
some 3
Master 2
some 1
some 2
some 3
I can style the list once I learn how I can it recognize each piece of the list as generated by the php. I prefer not to do   inserts all over the place :>)
My undying gratitude to you who can provide the solution!
I can generate the CSS styling to do the bulk of the design, but am running in circles trying to figure out how to style this output successfully:
[code=php]
<?
$sql = "select * from masterCategory" ;
$masterResult = mysql_query($sq l);
while ($mr = mysql_fetch_arr ay($masterResul t)){
echo " &n bsp;   ;";
echo "<font color=\"#FFFFFF \" size=\"+1\">".$ mr["name"]."</font><br>";
$sql = "SELECT * FROM category where masterid = ".$mr["id"]." ORDER BY id";
$result = mysql_query($sq l);
While($r = mysql_fetch_arr ay($result)){
echo " &n bsp;   ;";
echo "<A href=\"preview. php?cat=".$r["id"]."\">".$r["name"]."</A><br>";
}
echo "<br>";
}
?>[/code]
[Please use CODE tags when posting source code. Thanks! --pbmods]
The client determines the mastercategorie s (3 at the moment) and there are varying numbers of names under each mastercategory.
Here is the way I would like it to look:
Master 1
some1
some2
some 3
Master 2
some 1
some 2
some 3
I can style the list once I learn how I can it recognize each piece of the list as generated by the php. I prefer not to do   inserts all over the place :>)
My undying gratitude to you who can provide the solution!
Comment