<?php
// php login in here
if ($_GET["Monthci"] < 10) { //Converts check in Month into format need by putting a 0 infront of single digits
$correctedmonthci = "0".$_GET["Monthci"];}
$correctedmonthci = $_GET["Monthci"];
if ($_GET["Dayci"] < 10) { //Converts check in Day into format need by putting a 0 infront of single digits
$correcteddayci = "0".$_GET["Dayci"];}
$correcteddayci = $_GET["Dayci"];
if ($_GET["Monthco"] < 10) { //Converts check out Month into format need by putting a 0 infront of single digits
$correctedmonthco = "0".$_GET["Monthco"];}
$correctedmonthco = $_GET["Monthco"];
if ($_GET["Dayco"] < 10) { //Converts check out day into format need by putting a 0 infront of single digits
$correcteddayco = "0".$_GET["Dayco"];}
$correcteddayco = $_GET["Dayco"];
$checkindate = $_GET["Yearci"]."-".$correctedmonthci."-".$correcteddayci; //Forms date into needed format
$checkoutdate = $_GET["Yearco"]."-".$correctedmonthco."-".$correcteddayco; //Forms date into needed format
$days = round((strtotime("$checkoutdate") - strtotime("$checkindate"))/(60*60*24)); // Subtracts Checkin Date from Checkout date
$resort = $_GET['Resorts'];
$query = "SELECT * FROM hotel WHERE Resort = '$resort' "; //Query for for finding hotels
$result = mysql_query($query)
or die ("Couldn't execute query.");
echo "<form action = 'results.php' method='POST'>";
while ($row = mysql_fetch_array($result)) { //Creats Results table
echo "Resort: ".$row['Resort']." <br/>";
echo "Reviewer: ".$row['Reviewer']." <br/>";
echo "Star Rating: ".$row['Star']."<br/>";
echo "Website: ".$row['WebAddress']." <br/>";
echo "<input type='radio' name = ".$row."d value =".$row['SingleRoom']."/>
Cost of a Single Room During Stay = £ ".$row['SingleRoom']*$days." <br/>";
echo "<input type='radio' name = ".$row."d value =".$row['DoubleRoom']."/>
Cost of a Double Room During Stay = £ ".$row['DoubleRoom']*$days." <br/>";
echo "<hr>";
};
echo "<input type='submit' value = 'Proceed To Results' />";
?>
I need help on how to output the above result into another page and allow the user to see the page using session.
This post has been edited by inspectah: 03 May 2009 - 09:06 AM

New Topic/Question
Reply



MultiQuote




|