Jump to content

still probs with booking query..sorry!


puja

Recommended Posts

hey
im still having problems trying to get my code working for a booking query that i am trying 2 do
the booking is for holiday accommodation and the accommodation is searched for the the first page with details from an accommodation table which has the primary key accommID.
then from those results a radio button is chosen to carry on with the booking for that accommodation. on this booking page the users need to put in the booking start date and booking end date which is to be stored in the booking table.
the booking table has bookingID as the primary key and the accommID as a foreign key to link the to accommID's.
but what i am having problems with is storing the accommID that corresponds to the accomm chosen in the booking table.
i have tried to use hidden fields but it doesnt seem to work!
the following code is for the search results page:
i know i have used the hidden field twice but im not sure where it shud go, ive tried it in both places and it still doesnt work
[code]

$self = $_SERVER['PHP_SELF'];
$accommID = $_POST["accommID"];
$type = $_POST["select_type"];
$sleeps = $_POST["select_sleeps"];
$board = $_POST["select_board"];
$description = $_POST["description"];
$pets_allowed = $_POST["select_pets_allowed"];


//$query = "SELECT type, sleeps, board, description, pets_allowed FROM accommodation WHERE type = '$type' AND sleeps = '$sleeps' AND board = '$board' AND description= '$description' AND pets_allowed = '$pets_allowed'";
$query = "SELECT type, sleeps, board, description, pets_allowed FROM accommodation WHERE type='$type' && sleeps = '$sleeps' && board='$board' && pets_allowed ='$pets_allowed'";
$result = mysql_query ($query) or die(mysql_error());

$num = mysql_num_rows($result);

if ($num > 0){
             echo "<p>There is currently $num accommodation(s). </p>\n";
              echo '<FORM METHOD="POST" ACTION="add_book.php">';
              echo '<table align = "center" border = "1" cellspacing = "0" cellpadding = "5">
              <tr>
              <td align="left"><b>Type</b></td>
              <td align="left"><b>Sleeps</b></td>
              <td align="left"><b>Board</b></td>
              <td align="left"><b>Description</b></td>
              <td align="left"><b>Pets Allowed</b></td>
              <input type="hidden" name="accommID" value="'.$accommID.'">
              </tr>
              ';
              
              while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){
                echo '
              <tr>
              <td align="left">'. $row['type']. '</td>
              <td align="left">'. $row['sleeps']. '</td>
              <td align="left">'. $row['board']. '</td>
              <td align="left">'. $row['description']. '</td>
              <td align="left">'. $row['pets_allowed']. '</td>
              <td align=center><input type=radio name=accommID value="'.$row['accommID'].'"></td>
              </tr>
              ';
              }

              echo '</table>';
              echo '&nbsp';
              echo '<center> <input type="submit" value="Continue Booking"></center>';
              
              mysql_free_result($result);
              

              } else {

                  echo '<p class = "error">There are currently no types of accommodation for the choices entered.</p>';
              }

              echo '<input type="hidden" name="accommID" value="'.$accommID.'">';
              echo '</FORM>';

              mysql_close();

[/code]


and the code for the booking looks like:
[code]

$accommID = $_POST ["accommID"];
         $book_start = $_POST ["booking_start_date"];
         $book_end = $_POST ["booking_end_date"];

         $query = "INSERT INTO booking (booking_start_date, booking_end_date, accommID) VALUES ('$book_start','$book_end','$accommID')";

         mysql_query($query, $connection) or die (mysql_error());


[/code]

thanks
Link to comment
Share on other sites

Well first off you are passing the variable name twice in the same form.
No need for this one
[code]<input type="hidden" name="accommID" value="'.$accommID.'">[/code]
Just use this one
[code]<td align=center><input type=radio name=accommID value="'.$row['accommID'].'"></td>[/code]

Also if you do not know the accomID why are you setting it at the start of the page.
[code]$accommID = $_POST["accommID"];[/code]

You also have not pulled the accomID out of the table.

incorrect
[code]$query = "SELECT type, sleeps, board, description, pets_allowed FROM accommodation WHERE type='$type' && sleeps = '$sleeps' && board='$board' && pets_allowed ='$pets_allowed'";[/code]

correct
[code]$query = "SELECT accommID, type, sleeps, board, description, pets_allowed FROM accommodation WHERE type='$type' && sleeps = '$sleeps' && board='$board' && pets_allowed ='$pets_allowed'";[/code]

Have to select the accomID so you can pass it from the radio button
[code]<td align=center><input type=radio name=accommID value="'.$row['accommID'].'"></td>[/code]

try those changes and let me know

Ray


Link to comment
Share on other sites

hi again

now im having a different prob with it, after u did ur suggested changes it does put in the accommID but it puts the accommID on one record with empty dates and it puts the dates chosen by the user in a separate record with an empty acommID
Link to comment
Share on other sites

OK first thing I see is that you have no place to put in the dates, unless they are coming in from a previous page, in which case you have not passed them on to the query.

if $booking_start_date and $booking_end_date are coming from a previous page then you need to add a couple hidden values.

Add the hidden values after:
[code]if ($num > 0){[/code]

If they are not then you need to add some form fields for them and make sure you name them booking_start_date and booking_end_date

Ray





Link to comment
Share on other sites

hey
the booking start and end dates are coming from that booking page not the search page.
so on the booking page where the query is there is this further down in the page:


[code]
<form action ="<?php echo $_SERVER[PHP_SELF]; ?>" method="POST">
    <p align="center">&nbsp;</p>
    <p align="center"><u>Booking Start Date:</u>&nbsp;&nbsp;&nbsp; <input type="text" name="booking_start_date" size="20"></p>
    <p align="center"><u>Booking End Date:</u>&nbsp;&nbsp;&nbsp; <input type="text" name="booking_end_date" size="20"></p>
    <p>&nbsp;</p>
    <p><input type="submit" value="Submit"></p>
  </form>
[/code]

also i havnt got the accommID going thru any of my pages as a hidden field.
on my initial search page i just have the drop down lists for the choices and then on the search results page i have got the accommID hopefully going thru with the radio button and then on the booking script i havnt specified newhere that it is the accommID that was selected in the radio button.
or should it already know that coz i passed it thru with the radio button?
Link to comment
Share on other sites

ok i'll post the code on here for all three of the pages i am trying to link
i know the code isnt very good but i just need to try and get the functionality working
thanks 4 ur help!

search2.php

[code]

<html>
<head>
<title><?php echo "Search" ?></title>
<link rel="stylesheet" type="text/css" href="template2.css">
<head>
<body>

<?

session_start();
if(!isset($_SESSION[user_name])) { echo "<p><center>Please login to view this page.</p><p>&nbsp;</p> Please wait... You will automatically be redirected back to the login page";
echo "<META HTTP-EQUIV=Refresh CONTENT='3; URL=gen_homepage.php'>";

} else {

require_once("config.php");
     $connection = @mysql_connect($db_host, $db_user, $db_password) or die("oops! error connecting");
    
     mysql_select_db($db_name, $connection);
?>

<table border="1" width="100%" height="226">
  <tr>
    <td width="22%" height="91" bgcolor="#0099FF">&nbsp;
    <img alt ="[Company Logo]"
    src="puj2.gif" width="100" height="100">
    <p>
    </td>
    <td width="78%" height="91" bgcolor="#66CCFF" ALIGN=CENTER>&nbsp;

<H1> Search </H1>


    </td>
  </tr>
  <tr>
    <td width="22%" height="123" bgcolor="#6699FF">&nbsp;
      <div class="buttonscontainer">
      <div class="buttons">
      <a href="gen_homepage.php">Homepage</a>
      <a href="register.php">Register</a>
      <a href="calendar.php">Calendar</a>
      <a href="weatherinfo.php">Weather Information</a>
      <a href="travelinfo.php">Travel Information</a>
      <a href="logout.php">Logout</a>
      </div>
      </div>
    </td>
    <td width="78%" height="123" bgcolor="#99CCFF" ALIGN=CENTER>
     &nbsp;
          &nbsp;
          &nbsp;
          <?
      $accommID = $_POST ["accommID"];
       ?>
<center>
    <form name="search2.php" action="search_results2.php" method="POST">
          <font face="arial" size ="1">
    Type:
    <select name="select_type">
            <option value='Villa'>Villa</option>
            <option value='Caravan'>Caravan</option>
            <option value='Lodge'>Lodge</option>
          </select>
          &nbsp;
          Sleeps:
          <select name="select_sleeps">
            <option value='2'>Up to 2</option>
            <option value='4'>Up to 4</option>
            <option value='6'>Up to 6</option>
            <option value='8'>Up to 8</option>
            <option value='10'>Up to 10</option>
          </select> &nbsp; <br> <br>
          Board:
          <select name="select_board">
            <option value='Full Board'>Full Board</option>
            <option value='Half Board'>Half Board</option>
            <option value='B & B'>B & B</option>
            <option value='Self-Catering'>Self-Catering</option>
          </select> &nbsp;
          Pets Allowed:
          <select name="select_pets_allowed">
            <option value='Yes'>Yes</option>
            <option value='No'>No</option>
          </select> &nbsp;
          <br> <br>
          <input type="hidden" name="accommID" value="' . $accommID . '" />
           <center> <input type="submit" value="Search"></center>






  </form>
</td>



</table>
<?
}
?>

</body>
</html>

[/code]


search_results2.php

[code]

<html>
<head>
<title><?php echo "Search Results" ?></title>
<link rel="stylesheet" type="text/css" href="template2.css">
<head>
<body>

<?
session_start();
if(!isset($_SESSION[user_name])) { echo "<p><center>Please login to view this page.</p><p>&nbsp;</p> Please wait... You will automatically be redirected back to the login page";
echo "<META HTTP-EQUIV=Refresh CONTENT='3; URL=gen_homepage.php'>";


} else {

require_once("config.php");
     $connection = @mysql_connect($db_host, $db_user, $db_password) or die("oops! error connecting");
    
     mysql_select_db($db_name, $connection);



?>                                                

<table border="1" width="100%" height="226">
  <tr>
    <td width="22%" height="91" bgcolor="#0099FF">&nbsp;
    <img alt ="[Company Logo]"
    src="puj2.gif" width="100" height="100">
    <p>
    </td>
    <td width="78%" height="91" bgcolor="#66CCFF" ALIGN=CENTER>&nbsp;

<H1> Search Results</H1>

    </td>
  </tr>
  <tr>
    <td width="22%" height="123" bgcolor="#6699FF">&nbsp;
      <div class="buttonscontainer">
      <div class="buttons">
      <a href="search2.php">Search Again</a>
      <a href="logout.php">Logout</a>
      </div>
      </div>
    </td>
    <td width="78%" height="123" bgcolor="#99CCFF" ALIGN=CENTER>
    
    <?
    
    
$self = $_SERVER['PHP_SELF'];
$accommID = $_POST ["accommID"];
$type = $_POST["select_type"];
$sleeps = $_POST["select_sleeps"];
$board = $_POST["select_board"];
$description = $_POST["description"];
$pets_allowed = $_POST["select_pets_allowed"];


//$query = "SELECT type, sleeps, board, description, pets_allowed FROM accommodation WHERE type = '$type' AND sleeps = '$sleeps' AND board = '$board' AND description= '$description' AND pets_allowed = '$pets_allowed'";
$query = "SELECT accommID, type, sleeps, board, description, pets_allowed FROM accommodation WHERE type='$type' && sleeps = '$sleeps' && board='$board' && pets_allowed ='$pets_allowed'";
$result = mysql_query ($query) or die(mysql_error());

$num = mysql_num_rows($result);

if ($num > 0){

             echo "<p>There is currently $num accommodation(s). </p>\n";
              echo '<FORM METHOD="POST" ACTION="add_book.php">';
              echo '<table align = "center" border = "1" cellspacing = "0" cellpadding = "5">
              <tr>
              <td align="left"><b>Type</b></td>
              <td align="left"><b>Sleeps</b></td>
              <td align="left"><b>Board</b></td>
              <td align="left"><b>Description</b></td>
              <td align="left"><b>Pets Allowed</b></td>

              </tr>
              ';
              
              while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){
                echo '
              <tr>
              <td align="left">'. $row['type']. '</td>
              <td align="left">'. $row['sleeps']. '</td>
              <td align="left">'. $row['board']. '</td>
              <td align="left">'. $row['description']. '</td>
              <td align="left">'. $row['pets_allowed']. '</td>
              <td align=center><input type=radio name=accommID value="'.$row['accommID'].'"></td>
              </tr>
              ';
              }

              echo '</table>';
              echo '&nbsp';
              echo '<center> <input type="submit" value="Continue Booking"></center>';
              
              mysql_free_result($result);
              

              } else {

                  echo '<p class = "error">There are currently no types of accommodation for the choices entered.</p>';
              }


              echo '</FORM>';

              mysql_close();

              //$statment =mysql_query ("SELECT type FROM accommodation WHERE type = '$type' and sleeps ='$sleeps' and board ='$board' and pets_allowed = '$pets_allowed'");// WHERE type = '$type' AND sleeps = '$sleeps' AND board = '$board' AND pets_allowed = '$pets_allowed'");
              //print $statment;
              //$query = mysql_query($statment) or die(mysql_error());

?>


  </form>
</td>



</table>
<?
}
?>

</body>



[/code]

and finally the last one is add_book.php

[code]

<?php

session_start();
if(!isset($_SESSION[user_name])) { echo "<p><center>Please login to view this page.</p><p>&nbsp;</p> Please wait... You will automatically be redirected back to the login page";
echo "<META HTTP-EQUIV=Refresh CONTENT='3; URL=gen_homepage.php'>";
} else {

require_once("config.php");
     $connection = @mysql_connect($db_host, $db_user, $db_password) or die("oops! error connecting");

      mysql_select_db($db_name, $connection);

         $self = $_SERVER['PHP_SELF'];

         //$book_start = $_POST ["booking_start_date"];

         //$len = strlen($book_start);
         //if ($len > 0)
         //{
         $accommID = $_POST ["accommID"];
         $book_start = $_POST ["booking_start_date"];
         $book_end = $_POST ["booking_end_date"];
         $query = "INSERT INTO booking (booking_start_date, booking_end_date, accommID) VALUES ('$book_start','$book_end','$accommID')";

         mysql_query($query, $connection) or die (mysql_error());

         //}


?>
<html>
<head>
<title><?php echo "Add Booking" ?></title>
<link rel="stylesheet" type="text/css" href="template2.css">
<head>
<body>

<table border="1" width="100%" height="226">
  <tr>
    <td width="22%" height="91" bgcolor="#0099FF">&nbsp;
    <img alt ="[Company Logo]"
    src="puj2.gif" width="100" height="100">
    <p>
    </td>
    <td width="78%" height="91" bgcolor="#66CCFF" ALIGN=CENTER>&nbsp;

<H1> Add Booking </H1>

    </td>
  </tr>
  <tr>
    <td width="22%" height="123" bgcolor="#6699FF">&nbsp;
     <div class="buttonscontainer">
      <div class="buttons">
    <a href="cust_homepage.php">Customer Homepage</a>
    <a href="calendar.php">Calendar</a>
    <a href="logout.php">Logout</a>
    </div>
    </div>
    </td>
    <td width="78%" height="123" bgcolor="#99CCFF" ALIGN=CENTER>
    
     <p>&nbsp;</p>
    <form action ="<?php echo $_SERVER[PHP_SELF]; ?>" method="POST">
    <p align="center">&nbsp;</p>
    <p align="center"><u>Booking Start Date (YYYY/MM/DD):</u>&nbsp;&nbsp;&nbsp; <input type="text" name="booking_start_date" size="20"></p>
    <p align="center"><u>Booking End Date (YYYY/MM/DD) :</u>&nbsp;&nbsp;&nbsp; <input type="text" name="booking_end_date" size="20"></p>
    <p>&nbsp;</p>
    <p><input type="submit" value="Submit"></p>
  </form>

  
  
  </form>
</td>



</table>
<?
}
?>
</body>

</html>

[/code]

thank u for ur help!

puja
Link to comment
Share on other sites

OK I adjusted a few things on each page. So name the pages accordingly and check to make sure the action part of the forms goes to the correct pages.

search.php
[code]<?
session_start();
if(!isset($_SESSION['user_name'])) {
    echo "<p><center>Please login to view this page.</p><p> </p> Please wait... You will automatically be redirected back to the login page";
    echo "<META HTTP-EQUIV=Refresh CONTENT='3; URL=gen_homepage.php'>";
} else {
?>
<html>
<head>
<title>Search</title>
<link rel="stylesheet" type="text/css" href="template2.css">
<head>
<body>
<?
// No need for database connection because you are only filling in a form right now
//   $connection = @mysql_connect($db_host, $db_user, $db_password) or die("oops! error connecting");
//  mysql_select_db($db_name, $connection);
?>

<table border="1" width="100%" height="226">
  <tr>
    <td width="22%" height="91" bgcolor="#0099FF"> 
    <img alt ="[Company Logo]"
    src="puj2.gif" width="100" height="100">
    <p>
    </td>
    <td width="78%" height="91" bgcolor="#66CCFF" ALIGN=CENTER> 

<H1> Search </H1>


    </td>
  </tr>
  <tr>
    <td width="22%" height="123" bgcolor="#6699FF"> 
      <div class="buttonscontainer">
      <div class="buttons">
      <a href="gen_homepage.php">Homepage</a>
      <a href="register.php">Register</a>
      <a href="calendar.php">Calendar</a>
      <a href="weatherinfo.php">Weather Information</a>
      <a href="travelinfo.php">Travel Information</a>
      <a href="logout.php">Logout</a>
      </div>
      </div>
    </td>
    <td width="78%" height="123" bgcolor="#99CCFF" ALIGN=CENTER>
      
           
           
          <?
// No need for this now you have now found the accomodation
// $accommID = $_POST ["accommID"];
       ?>
<center>
    <form name="booksearch" action="searchresults.php" method="POST">
          <font face="arial" size ="1">
    Type:
    <select name="select_type">
            <option value='Villa'>Villa</option>
            <option value='Caravan'>Caravan</option>
            <option value='Lodge'>Lodge</option>
          </select>
           
          Sleeps:
          <select name="select_sleeps">
            <option value='2'>Up to 2</option>
            <option value='4'>Up to 4</option>
            <option value='6'>Up to 6</option>
            <option value='8'>Up to 8</option>
            <option value='10'>Up to 10</option>
          </select>   <br> <br>
          Board:
          <select name="select_board">
            <option value='Full Board'>Full Board</option>
            <option value='Half Board'>Half Board</option>
            <option value='B & B'>B & B</option>
            <option value='Self-Catering'>Self-Catering</option>
          </select>  
          Pets Allowed:
          <select name="select_pets_allowed">
            <option value='Yes'>Yes</option>
            <option value='No'>No</option>
          </select>  
          <br> <br>
           <center> <input type="submit" value="Search"></center>
  </form>
</td>
</table>
<?
}
?>
</body>
</html>[/code]

searchresults.php
[code]<?
session_start();
if(!isset($_SESSION['user_name'])) { echo "<p><center>Please login to view this page.</p><p> </p> Please wait... You will automatically be redirected back to the login page";
echo "<META HTTP-EQUIV=Refresh CONTENT='3; URL=gen_homepage.php'>";
} else {
echo "<html>
      <head>
      <title>Search Results</title>
      <link rel=\"stylesheet\" type=\"text/css\" href=\"template2.css\">
      <head>
      <body>";

$connection = @mysql_connect($db_host, $db_user, $db_password) or die("oops! error connecting");
mysql_select_db($db_name, $connection);
?>

<table border="1" width="100%" height="226">
  <tr>
    <td width="22%" height="91" bgcolor="#0099FF"> 
    <img alt ="[Company Logo]"
    src="puj2.gif" width="100" height="100">
    <p>
    </td>
    <td width="78%" height="91" bgcolor="#66CCFF" ALIGN=CENTER> 

<H1> Search Results</H1>

    </td>
  </tr>
  <tr>
    <td width="22%" height="123" bgcolor="#6699FF"> 
      <div class="buttonscontainer">
      <div class="buttons">
      <a href="search2.php">Search Again</a>
      <a href="logout.php">Logout</a>
      </div>
      </div>
    </td>
    <td width="78%" height="123" bgcolor="#99CCFF" ALIGN=CENTER>

    <?


$self = $_SERVER['PHP_SELF'];
$type = $_POST["select_type"];
$sleeps = $_POST["select_sleeps"];
$board = $_POST["select_board"];
$pets_allowed = $_POST["select_pets_allowed"];


//$query = "SELECT type, sleeps, board, description, pets_allowed FROM accommodation WHERE type = '$type' AND sleeps = '$sleeps' AND board = '$board' AND description= '$description' AND pets_allowed = '$pets_allowed'";
$query = "SELECT accommID, type, sleeps, board, description, pets_allowed FROM accommodation WHERE type='$type' && sleeps = '$sleeps' && board='$board' && pets_allowed ='$pets_allowed'";
$result = mysql_query ($query) or die(mysql_error());

$num = mysql_num_rows($result);

if ($num > 0){

             echo "<p>There is currently $num accommodation(s). </p>\n";
              echo '<FORM METHOD="POST" ACTION="add_book.php">';
              echo '<table align = "center" border = "1" cellspacing = "0" cellpadding = "5">
              <tr>
              <td align="left"><b>Type</b></td>
              <td align="left"><b>Sleeps</b></td>
              <td align="left"><b>Board</b></td>
              <td align="left"><b>Description</b></td>
              <td align="left"><b>Pets Allowed</b></td>

              </tr>
              ';

              while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){
                echo '
              <tr>
              <td align="left">'. $row['type']. '</td>
              <td align="left">'. $row['sleeps']. '</td>
              <td align="left">'. $row['board']. '</td>
              <td align="left">'. $row['description']. '</td>
              <td align="left">'. $row['pets_allowed']. '</td>
              <td align=center><input type=radio name=accommID value="'.$row['accommID'].'"></td>
              </tr>
              ';
              }

              echo '</table>';
              echo ' ';
              echo '<center> <input type="submit" value="Continue Booking"></center>';
              echo '</FORM>';
              mysql_free_result($result);


              } else {

                  echo '<p class = "error">There are currently no types of accommodation for the choices entered.</p>';
              }
              mysql_close();

              //$statment =mysql_query ("SELECT type FROM accommodation WHERE type = '$type' and sleeps ='$sleeps' and board ='$board' and pets_allowed = '$pets_allowed'");// WHERE type = '$type' AND sleeps = '$sleeps' AND board = '$board' AND pets_allowed = '$pets_allowed'");
              //print $statment;
              //$query = mysql_query($statment) or die(mysql_error());

?>
</td>
</table>
<?
}
?>
</body>
</html>[/code]

add_book.php
[code]<?php
session_start();
if(!isset($_SESSION['user_name'])) { echo "<p><center>Please login to view this page.</p><p> </p> Please wait... You will automatically be redirected back to the login page";
echo "<META HTTP-EQUIV=Refresh CONTENT='3; URL=gen_homepage.php'>";
} else {
?>
<html>
<head>
<title>Add Booking</title>
<link rel="stylesheet" type="text/css" href="template2.css">
<head>
<body>

<table border="1" width="100%" height="226">
  <tr>
    <td width="22%" height="91" bgcolor="#0099FF"> 
    <img alt ="[Company Logo]"
    src="puj2.gif" width="100" height="100">
    <p>
    </td>
    <td width="78%" height="91" bgcolor="#66CCFF" ALIGN=CENTER> 

<H1> Add Booking </H1>

    </td>
  </tr>
  <tr>
    <td width="22%" height="123" bgcolor="#6699FF"> 
     <div class="buttonscontainer">
      <div class="buttons">
    <a href="cust_homepage.php">Customer Homepage</a>
    <a href="calendar.php">Calendar</a>
    <a href="logout.php">Logout</a>
    </div>
    </div>
    </td>
    <td width="78%" height="123" bgcolor="#99CCFF" ALIGN=CENTER>

     <p> </p>
<?
if(isset($_POST['submit'])){
$connection = @mysql_connect($db_host, $db_user, $db_password) or die("oops! error connecting");
mysql_select_db($db_name, $connection);

         //$book_start = $_POST ["booking_start_date"];

         //$len = strlen($book_start);
         //if ($len > 0)
         $accommID = $_POST ["accommID"];
         $book_start = $_POST ["booking_start_date"];
         $book_end = $_POST ["booking_end_date"];
         $query = "INSERT INTO booking (booking_start_date, booking_end_date, accommID) VALUES ('$book_start','$book_end','$accommID')";
           $result = mysql_query($query) or die (mysql_error());
             if(!$result){
             echo "Booking not added
             </td>
            </table>";
             } else {
             echo "You have succeffully booked...
             </td>
            </table>";
             }
} else {
$accommid = $_POST['accommID'];
?>
    <form action ="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    <input type=hidden name=accommID value="<?=$accommid?>">
    <p align="center"> </p>
    <p align="center"><u>Booking Start Date (YYYY/MM/DD):</u>    <input type="text" name="booking_start_date" size="20"></p>
    <p align="center"><u>Booking End Date (YYYY/MM/DD) :</u>    <input type="text" name="booking_end_date" size="20"></p>
    <p> </p>
    <p><input type="submit" name=submit value="Submit"></p>
  </form>
</td>
</table>
<?
}
echo "</body>
      </html>";
}
?>[/code]

Might want to go through the code and clean things up, people with different browsers will get different looks if the code in not "clean". By clean I mean make sure all your tags are closed and in the right place.

Let me know how you make out

Ray

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.