the script i made makes the table look awkward, and i've been looking around to find a solution to my problem but couldn't find one that works.
the thing is that after the 4th product/article the table goes messy all around the page.
i am new to php so i went for table layout and this is the solution i prefer since i understand the works of it. i could go with div but would be a bit hard for me.
if you guys have any idea or some good reference i could chekout, please help.
yhanks alot
------------------------------------------------------------------------
Code: Select all
<?php
include_once("admincp/config.inc.php");
$stati=urldecode($_REQUEST['Stati']);
?>
<html>
<head>
<title><?=$title;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="admin/inc/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style2 {font-weight: bold; }
.style4 {font-weight: bold; }
.style5 {font-weight: bold}
-->
</style>
</head>
<body>
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="top" class="bg_main"><table width="980" height="438" border="0" cellpadding="0" cellspacing="0" class="base">
<tr>
<td height="10" align="right" valign="top">
<table width="980" border="0" cellpadding="0" cellspacing="0" class="base">
<tr>
<td height="20" valign="top"> </td>
</tr>
<tr>
<td align="center" valign="top"><? require_once("header.php"); ?></td>
</tr>
</table> </td>
</tr>
<tr>
<td valign="top" align="center" class="a_base"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="213" valign="top" scope="col"><?php require_once("sidebar.php") ?></th>
<th width="10" scope="col"> </th>
<th valign="top" scope="col"><table width="500" border="0">
<tr>
<td width="140"> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td align="left" valign="middle"><?php
$qry_hotel=mysql_query("select * from hotel where statiune='$stati'");
while ($hotel_rs=mysql_fetch_array($qry_hotel)){
?>
<table width="200" border="0">
<tr>
<td colspan="2" align="center"><img src="admincp/photos/hotel/<?=$hotel_rs['img1'];?>" width="200" height="150"></td>
</tr>
<tr>
<td width="118" height="28" align="right"> </td>
<td width="80" align="center" valign="middle" background="imgs/prcbg.jpg" class="sidebar"><span class="style2">
<?=$hotel_rs['p_label']." ";?>
</span></td>
</tr>
<tr>
<td colspan="2" align="left"><span class="tour"><a href="hotel.php?ID=<?=$hotel_rs['ID'];?>" class="tour">
<?=$hotel_rs['nume_hotel'];?>
</a></span></td>
</tr>
</table></td>
<td width="145" class="tour"><?php
$hotel_rs=mysql_fetch_array($qry_hotel);
//dont display blank box for picture
if(!empty ($hotel_rs['nume_hotel'])){
?>
<table width="200" border="0">
<tr>
<td colspan="2" align="center"><img src="admincp/photos/hotel/<?=$hotel_rs['img1'];?>" width="200" height="150"></td>
</tr>
<tr>
<td width="118" height="28" align="right"> </td>
<td width="80" align="center" valign="middle" background="imgs/prcbg.jpg" class="sidebar"><span class="style4">
<?=$hotel_rs['p_label']."-";?>
</span></td>
</tr>
<tr>
<td colspan="2" align="left"><a href="hotel.php?ID=<?=$hotel_rs['ID'];?>" class="tour">
<?=$hotel_rs['nume_hotel'];?>
</a></td>
</tr>
</table></td>
<td width="193" class="tour"><?php
//if closing of third picture box
}else{
echo ''; }
$hotel_rs=mysql_fetch_array($qry_hotel);
//dont display blank box for picture
if(!empty ($hotel_rs['nume_hotel'])){
?>
<table width="200" border="0">
<tr>
<td colspan="2" align="center"><img src="admincp/photos/hotel/<?=$hotel_rs['img1'];?>" width="200" height="150"></td>
</tr>
<tr>
<td width="118" height="28" align="right"> </td>
<td width="80" align="center" valign="middle" background="imgs/prcbg.jpg" class="sidebar"><span class="style5">
<?=$hotel_rs['p_label']."...";?>
</span></td>
</tr>
<tr>
<td colspan="2" align="left"><a href="hotel.php?ID=<?=$hotel_rs['ID'];?>" class="tour">
<?=$hotel_rs['nume_hotel'];?>
</a></td>
</tr>
</table></td>
</tr>
<tr>
<td> </td>
<td></td>
<td></td>
</tr>
<?
//if closing of third picture box
}else{
echo ''; }
} ?>
</table></th>
</tr>
</table></td>
</tr>
<tr>
<td height="10" align="center" valign="top"><? require_once("bottom.php"); ?></td>
</tr>
<tr>
<td height="10" align="center" valign="top"> </td>
</tr>
</table></td>
</tr>
</table>
</html>