Sorry everyone - i know this will be very simple but just don't know how to do it and can't find anything on the forums (probably just because i don't know what to search under though - sorry!)...
I am making a hotel search site and am having trouble with the page which displays a list of hotels, ten at a time. At the bottom of the page i want to display previous and next buttons. the thing is i want to use different buttons for hotels in england, hotels in scotland etc etc. So i am storing the buttons in eg.
www.mysite/england/button.gif
www.mysite/scotland/button.gif
www.mysite/wales/button.gif
This is the code i'm using to call up the buttons:
<?php
if ($page == $pager->numPages) // this is the last page - there is no next page
echo "<td> </td>";
else // not the last page, link to the next page
echo "<td align=\"right\"><a href=\"showhotels.php?page=" . ($page + 1) . "&Town=" . $Town . "&County=" . $County . "&Region=" . $Region . "\"><img src=\"http://www.hotelheaven.co.uk/" . $_POST['Region'] . "/next.gif\" border=\"0\"></a>";
?>
At the top of my page I have (amongst other things which i don't think are relevant to this) the following:
//Select all hotels from the chosen area
$query = "SELECT EstablishmentName,RoomsFrom,NumBedrooms,EstablishmentType,Address1,Address2,Town,County,LongDescriptionEnglish,Hotel_Id,Region,AARating,RACRating FROM hotel WHERE County='$County' or Town='".$_GET['Town']."' LIMIT $offset, $limit";
$result = mysql_query($query)
or die ("Couldn't execute query");
The thing is, can anyone tell me why when i type $_POST['Region'] it won't translate into England/Scotland/Wales etc? Do I need to use mysql_fetch_array? (no pages have hotels from more than one region on them)
I'd be VERY grateful for any help!
LizzyD