Hi,
Thank you for posting the solution. Unfortunately I have problems making it work. The script below is part of a complete hotel reservation script which is working well. I just need to have the row $Cat=$row[0]; in "Please Select A Region"displayed in 3 or 4 columns. (see near the end of the script)
How and where do I include your coding. I tried a few different approachhes but all failed.
I really would be grateful for your help.
Best regards - Klaus
<?
require("Cart.php");
DBinfo();
Brand();
Root();
mysql_connect("$DBHost","$DBUser","$DBPass");
$old=date("z")-1;
mysql("$DBName","DELETE FROM Users WHERE Date < $old");
$result=mysql("$DBName","SELECT CartItemsID,Date FROM CartItems");
while ($row=mysql_fetch_row($result)) {
$CII=$row[0];
$CDa=$row[1];
$pieces=explode(":",$CDa);
$DCHK=$pieces[1];
if ($DCHK < $old) {
mysql("$DBName","DELETE FROM CartItems WHERE CartItemsID = '$CII'");
}
}
if ($UID != "") {
$result=mysql("$DBName","SELECT * FROM Users WHERE User='$UID'");
$num=mysql_num_rows($result);
if ($num == "0") {
$dt=date("YmdHis");
$UID="$dt$REMOTE_ADDR";
$date=date("z");
mysql("$DBName","INSERT INTO Users VALUES ('$UID','$date')");
Header("Location: $PHP_SELF?UID=$UID");
}
}
if ($UID == "") {
$dt=date("YmdHis");
$UID="$dt$REMOTE_ADDR";
$date=date("z");
mysql("$DBName","INSERT INTO Users VALUES ('$UID','$date')");
Header("Location: $PHP_SELF?UID=$UID");
}
commonHeader("$Company","Select a Region");
;fontSize("-1","silver","Arial","<b>A Hotel Reservation System powered by Reservations Africa
for TRAVEL AGENTS</b><br>");
fontSize("-2","blue","Verdana","<a href='http://resafrica.net/members/admin.php?pageId=logout'><b>LOGOUT</b></a>");
fontFace("Arial","Please Select a Region:<br><br>");
echo "<ul>";
$result=mysql("$DBName","SELECT * FROM Category ORDER BY Category");
while ($row = mysql_fetch_row($result)) {
$Cat=$row[0]; //SHOULD BE DISPLAYED IN 3 COLUMNS
$CatID=$row[1]; //IS NOT DISPLAYED
fontFace("Arial","<li><a href='$Relative/items.php?CA=$CatID&UID=$UID'>$Cat</a></li>");
}
echo "</ul>";
?>
😕