Hi there again, I hope your not getting fed up with me.
Here is the complete page:
I must confess, I am not even sure what to do with the last past of the script where the <a href > bits are. I am sorry to bother you so much
Thanks for your help
DCJ
<html>
<head>
<STYLE>
<!--
A{text-decoration:none}
-->
</STYLE>
<title>Hotels</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript">
<!--
function openpopup(){
var popurl="../../legend.htm"
winpops=window.open(popurl,"","width=500,height=338,scrollbars,")
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body background="../../Gif/Background.gif" onLoad="MM_preloadImages('../../Gif/HandR.gif')">
<table width="100%" height="100%">
<tr>
<td align="center" valign="top">
<table width="500" border="0" align="center">
<tr>
<td colspan="2"> <font color="#990000" size="-1"><a href="../Accom.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('handl','','../../Gif/HandR.gif',1)"><img name="handl" border="0" src="../../Gif/HandG.gif" width="35" height="12"></a>Accomodation</font>
</tr>
<tr>
<td colspan="2">
<div align="left"></div>
</tr>
<tr>
<td colspan="2">
<div align="center"><font color="#990000" size="-1">Warwickshire Guest
Houses</font></div>
</tr>
<tr>
<td colspan="2" height="10">
</tr>
<tr>
<td height="17">
<td width="153" height="17">
<div align="left"><a href="javascript:openpopup()"><font size="-1">symbols</font></a>
</div>
</tr>
<tr>
<td colspan="2">
<?php
include 'error.inc';
include 'db.inc';
$var1 = rose2.gif;
$var2 = rose2.gif;
$var3 = rose3.gif;
$var4 = rose4.gif;
$var5 = rose5.gif;
$tar1 = tar1.gif;
$tar2 = tar2.gif;
$tar3 = tar3.gif;
$tar4 = tar4.gif;
$tar5 = tar5.gif;
$query = "select id, location, name, county, rating, tariff from accom where acctype = 'H' order by rating limit 10";
if (!($connection = @ mysql_connect($server,
$user,
$password)))
die("Cannot connect");
if (!(mysql_select_db("db66511019", $connection)))
showerror();
// Run the query on the connection
if (!($result = @ mysql_query ($query, $connection)))
showerror();
$step = $diff = 10;
$r = mysql_query("SELECT count() FROM accom ") or die(mysql_error());
$anz = mysql_result($r,0);
if ($offset+$diff>=$anz) {
$diff = $anz - $offset;
$vor = TRUE;
}
if (!$offset || $offset<0) {
$offset = 0;
$zur = TRUE;
}
$result=mysql_query("$DBName","SELECT FROM accom ORDER BY Name LIMIT $offset,$diff");
// Start a table, with column headers
echo "\n<table width=\"500\" border=\"0\" cellpadding=\"2\" cellspacing\"1\">" .
"\n\t<td width=\"30%\" bgcolor=\"#990000\"><font color=\"white\" size=\"-1\" >Name</td>" .
"\n\t<td width=\"25%\" bgcolor=\"#990000\"><font color=\"white\" size=\"-1\" face=\"airal\">Location</td>" .
"\n\t<td width=\"16%\" bgcolor=\"#990000\"><font color=\"white\" size=\"-1\" >County</td>" .
"\n\t<td width=\"16%\" bgcolor=\"#990000\"><font color=\"white\" size=\"-1\" >Rating</td>" .
"\n\t<td width=\"16%\" bgcolor=\"#990000\"><font color=\"white\" size=\"-1\" >Tariff</td>" .
"\n</tr>";
echo "\n<tr>\n\t<td></td>\n</tr>";
echo "\n<tr>\n\t<td></td>\n</tr>";
echo "\n<tr>\n\t<td></td>\n</tr>";
// Until there are no rows in the result set,
// fetch a row into the $row array and ...
while ($row = mysql_fetch_array($result))
{
// ... start a TABLE row ...
echo "\n<tr>";
?>
<td align="left" background=\"../../Gif/Background.gif\"><font color="black\" face="arial\"size="-6">
<a href=\"accomodation/php/ac.php?idname=<? echo urlencode($row["name"]).">".$row["name"] ?></a></td>
<?
"\n\t";
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><font color=\"black\" face=\"arial\"size=\"-6\" >" .
$row["location"] .
"\n\t";
echo "<td align=\"left\"background=\"../../Gif/Background.gif\"><font color=\"black\" face=\"arial\"size=\"-6\" >" .
$row["county"] .
"\n\t";
if ($row["rating"] == "1")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$var1."\"</td>";
elseif ($row["rating"] == "2")
echo "\n\t<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$var2."\"</td>";
elseif ($row["rating"] == "3")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$var3."\"</td>";
elseif ($row["rating"] == "4")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$var4."\"</td>";
elseif ($row["rating"] == "5")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$var5."\"</td>";
"\n\t";
if ($row["tariff"] == "1")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$tar1."\"</td>";
elseif ($row["tariff"] == "2")
echo "\n\t<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$tar2."\"</td>";
elseif ($row["tariff"] == "3")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$tar3."\"</td>";
elseif ($row["tariff"] == "4")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$tar4."\"</td>";
elseif ($row["tariff"] == "5")
echo "<td align=\"left\" background=\"../../Gif/Background.gif\"><img src=\"".$tar5."\"</td>";
echo "</tr>";
// Finish the row
echo "\n</tr>";
}
/**************************************************
HERE IS WHERE I AM NOT TO SURE WHAT TO DO WITH. this is the script has I copied it from the this site, I have not started to look at it as yet. I know I need to change the "&UID" and "$CA" but to what. thats the question.
/**************************************************
if ($zur != TRUE) echo '<a href="'.$PHP_SELF.'?acctype='.$CA.'&offset='.($offset-$step) . '&UID='.$UID.' ">Back </a> ';
for ($i=1;$i<=(int)ceil($anz/$step);$i++) echo '<a href="'.$PHP_SELF.'?acctype'.$CA.'&offset='.(($i-1)*$step). '&UID='.$UID. '" > '.$i.'</a> ';
if ($vor != TRUE) echo '<a href="'.$PHP_SELF.'?acctype'.$CA.'&offset='.($offset+$step). '&UID='.$UID.'">next</a>';
/*********************************************
// Then, finish the table
echo "\n</table>\n";
// Close the connection
if (!(mysql_close($connection)))
showerror();
?>
</tr>
<tr>
<td colspan="2">
</tr>
<tr>
<td colspan="2" height="20">
<tr>
<td colspan="2" height="20">
</tr>
</table>
</table>
</body>
</html>