Jump to content

Recommended Posts

Weird, I just tried this example and it works fine.

 

$error = FALSE;
if (1 {
   $output = "You cannot book a return flight before your out-going flight!";
   $error = TRUE;
}
?>



{
echo '' . $output . '';
}
else  {
?>
ELSE?


Weird, I just tried this example and it works fine.

 

<?php
$error = FALSE;
if (1 < 2) 
{
   $output = "You cannot book a return flight before your out-going flight!";
   $error = TRUE;
}
?>
<head>
<body>

<?php if($error == TRUE) 
{
echo '<h1>' . $output . '</h1>';
}
else  {
?>
<h1>ELSE?</h1>
<?php } ?>
</head>
</body>

 

Nope on mine keeps going round onto the loop and does not return any errors or anything. Mayb phpsensi can help!!

 

why so hard!!

This is my last attempt.  I don't see why it's working in my test and not in your script.  Maybe someone else can see the problem...

 

ini_set ("display_errors", "1");
error_reporting(E_ALL);

$error = FALSE;
   //database information
     $host      = "stocks"; // Host name
     $username  = "wbennett"; // Mysql username
     $password  = "mysql5"; // Mysql password
     $db_name   = "wbennett"; // Database name
     $tbl_name1 = "flight_webair";
    
      mysql_connect("$host", "$username", "$password")or die("cannot connect");
      mysql_select_db("$db_name")or die("cannot select DB"); 
   
   // Variables 
     $flight_route_out    = $_POST['flight_route_out'];
     $flight_route_return = $_POST['flight_route_return'];
     $date_out            = $_POST['departure_date'];
     $date_return         = $_POST['return_date'];
     $passenger_num       = $_POST['num_of_pass'];
     $one_way             = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first.
     
    
if (strtotime($_POST['return_date'])    $output = "You cannot book a return flight before your out-going flight!";
   $error = TRUE;
}

   //To protect MySQL injection
     $flight_route_out = stripslashes($flight_route_out);
     $flight_route_return = stripslashes($flight_route_return);
     $flight_route_out = mysql_real_escape_string($flight_route_out);
     $flight_route_return = mysql_real_escape_string($flight_route_return);
   
   //Queries
     $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'";
     //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'";
   
   //Execute  query  1
     $result = mysql_query($sql1) or die(mysql_error());

    

   if(mysql_num_rows($result) > 0){       
      
?>
    

  
         http-equiv="Content-Type"
     content="text/html; charset=iso-8859-1"
   />
         rel="stylesheet"
     href="dropdown2.css"
     type="text/css"
    />
         type="text/javascript"
       src="dropdown.js">
   
          type="text/javascript"   
       src="calendar.js">
   
         type="text/javascript"   
       src="enablefield.js">
   
    Booking Confirmation 
        type="text/javascript">
       function greyText(one_way, return_date)
       {
          if (document.form1[one_way].checked)
          {
           document.form1[return_date].disabled=true;
              document.form1[return_flight].disabled=true;
            }
        else
          {
              document.form1[return_date].disabled=false;
              document.form1[return_flight].disabled=false;
            }
        }
      Webair Contact Us

     
   
   
     
       
         
          
                         src="Webair--logo.gif"
              height= "65"
            width="240"
                 align="top"
            />
          
                     background="Banner--background.gif"
          height="60"
          align="right"
          width="817"
         >
                            class="hyperlink"
              href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php">
           
              
              Staff login
              
            
                 |   
                            class="hyperlink"
             href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"
            >
           
             Home
           
           
                |
                          class="hyperlink"
            href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"
           >
             
             Booked Flights
               &nbsp
             
           
   
          
        
     
           class="dropdown"
    >
               id="one-ddheader"
        onmouseover="ddMenu('one',1)"
         onmouseout="ddMenu('one',-1)"
      >
        Home
      
               id="one-ddcontent"
        onmouseover="cancelHide('one')"
         onmouseout="ddMenu('one',-1)"
      >
         
           
                          href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"
             class="underline"
            >
              Home
            
          
         
      
     
           class="dropdown"
    >
             id="two-ddheader"
        onmouseover="ddMenu('two',1)"
        onmouseout="ddMenu('two',-1)"
     >
       Contact us
     
                id="two-ddcontent"
        onmouseover="cancelHide('two')"
          onmouseout="ddMenu('two',-1)"
      >
       
           
                       href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact"
            class="underline"
          >
            Contact us
          
         
        
       
     
           class="dropdown"
    >
                 id="three-ddheader"
       onmouseover="ddMenu('three',1)"
       onmouseout="ddMenu('three',-1)"
      >
        Flights
      
                   id="three-ddcontent"
         onmouseover="cancelHide('three')"
           onmouseout="ddMenu('three',-1)"
       >
           
                         
            
                          href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html"
             class="underline"
            >
              Refund Policy
            
          
           
         
     
         class="dropdown"
    >
               id="four-ddheader"
       onmouseover="ddMenu('four',1)"
         onmouseout="ddMenu('four',-1)"
      >
        Travel Information
      
                  id="four-ddcontent"
         onmouseover="cancelHide('four')"
           onmouseout="ddMenu('four',-1)"
       >
          
            
                          href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html"
            class="underline"
           >
             Flight Timetable
           
         
            
                        href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html"
            class="underline"
           >
             Baggage Information
           
         
            
                        href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html"
            class="underline"
            >
             Airport information
           
         
            
                        href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html"
            class="underline"
           >
             Travel documentation requirements
           
           
          
        
      
             class="dropdown"
     >
             id="five-ddheader"
      onmouseover="ddMenu('five',1)"
        onmouseout="ddMenu('five',-1)"
     >
       About Webair
     
                id="five-ddcontent"
        onmouseover="cancelHide('five')"
          onmouseout="ddMenu('five',-1)"
      >
          
            
                        href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html"
            class="underline"
           >
             About Webair
           
          
            
                         href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html"
            class="underline"
           >
             Contact us
           
          
          
        
      
            style="clear:both"
      />
    
             id="content"
     >
            id="table_gen_1"
     >
               class="inner"
      >
      

   

//THERE IS AN ERROR display error message 
if($error == TRUE)
{
    echo '' . $output . '';
}
else {
?>

 Confirm Booking 
 Out-going Flight Information: 


while($row = mysql_fetch_array($result)){
   echo "

          



   </pre>
<table border="'1'" cellpadding="10">  
     
      
         
         Flight Number
       
       
      
        
           Flight Route Selected
       
      
      
        
          Departure Time
           
      
      
        
         Arrival Time 
         
       
      
        
         Departure Date
       
      
      
        
         Return Date
       
      
      
         
         Number of Passengers Selected
       
      
     
     
      
        
           ".$row['flight_num']." 
        
      
      
        
          ".$row['flight_route']." 
        
       
      
        
         ".$row['departure_time']."
         
      
      
        
         ".$row['arrival_time']."
         
      
      
        
          ".$date_out."
        
      
      
        
          ".$date_return."
        
      
      
        
          ".$passenger_num['num_of_pass']." 
       
      
    
   </table>
<br><br>        <br><br>"; <br>}  <br>}<br>?><br><br><br><br><br><div id="footer">




Staff login
     |   
    Home
    |
    Contact us
    |
    About Webair
   




</div>
<br>     <br>     <br>   <br>          <br>     }else{<br>      <br>     echo 'Sorry, couldn\'t find any flights';<br>    <br>    }       <br>         <br>mysql_free_result($result);   <br

change

 

$nonUSdate1 = $date_out;
list($day,$month,$year) = explode('/',$nonUSdate1);
$newDate = "{$month}/{$day}/{$year}";
$stamp = strtotime($newDate1); 

 

to

 

$nonUSdate1 = $date_out;
list($day,$month,$year) = explode('/',$nonUSdate1);
$newDate1 = "{$month}/{$day}/{$year}";
$stamp = strtotime($newDate1); 

change

$nonUSdate2 = $date_return;
list($day,$month,$year) = explode('/',$nonUSdate2);
$newDate = "{$month}/{$day}/{$year}";
$stamp = strtotime($newDate2);

 

to

$nonUSdate2 = $date_return;
list($day,$month,$year) = explode('/',$nonUSdate2);
$newDate2 = "{$month}/{$day}/{$year}";
$stamp2 = strtotime($newDate2);

And Full Code Should be:

 

<?php

// Variables 
     $flight_route_out    = $_POST['flight_route_out'];
     $flight_route_return = $_POST['flight_route_return'];
     $date_out            = $_POST['departure_date'];
     $date_return         = $_POST['return_date'];
     $passenger_num       = $_POST['num_of_pass'];
     $one_way             = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first.
     

$nonUSdate1 = $date_out;
list($day,$month,$year) = explode('/',$nonUSdate1);
$newDate1 = "{$month}/{$day}/{$year}";
$stamp = strtotime($newDate1); 

 $nonUSdate2 = $date_return;
list($day,$month,$year) = explode('/',$nonUSdate2);
$newDate2 = "{$month}/{$day}/{$year}";
$stamp2 = strtotime($newDate2);

   //To protect MySQL injection
     $flight_route_out = stripslashes($flight_route_out);
     $flight_route_return = stripslashes($flight_route_return);
     $flight_route_out = mysql_real_escape_string($flight_route_out);
     $flight_route_return = mysql_real_escape_string($flight_route_return);
   
   //Queries
     $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'";
     //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'";
   
   //Execute  query  1
     $result = mysql_query($sql1) or die(mysql_error());

     
if ($stamp < $stamp2){
echo "You cannot return before you leave!";
}
?>

 

 

You forgot to change $newDate to $newDate1 and $newDate2,

 

And Full Code Should be:

 

<?php

// Variables 
     $flight_route_out    = $_POST['flight_route_out'];
     $flight_route_return = $_POST['flight_route_return'];
     $date_out            = $_POST['departure_date'];
     $date_return         = $_POST['return_date'];
     $passenger_num       = $_POST['num_of_pass'];
     $one_way             = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first.
     

$nonUSdate1 = $date_out;
list($day,$month,$year) = explode('/',$nonUSdate1);
$newDate1 = "{$month}/{$day}/{$year}";
$stamp = strtotime($newDate1); 

 $nonUSdate2 = $date_return;
list($day,$month,$year) = explode('/',$nonUSdate2);
$newDate2 = "{$month}/{$day}/{$year}";
$stamp2 = strtotime($newDate2);

   //To protect MySQL injection
     $flight_route_out = stripslashes($flight_route_out);
     $flight_route_return = stripslashes($flight_route_return);
     $flight_route_out = mysql_real_escape_string($flight_route_out);
     $flight_route_return = mysql_real_escape_string($flight_route_return);
   
   //Queries
     $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'";
     //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'";
   
   //Execute  query  1
     $result = mysql_query($sql1) or die(mysql_error());

     
if ($stamp < $stamp2){
echo "You cannot return before you leave!";
}
?>

 

 

You forgot to change $newDate to $newDate1 and $newDate2,

 

 

dude is  this right:

 

<?php
ini_set ("display_errors", "1");
error_reporting(E_ALL);

$error = FALSE;
   //database information
     $host      = "stocks"; // Host name
     $username  = "wbennett"; // Mysql username
     $password  = "mysql5"; // Mysql password
     $db_name   = "wbennett"; // Database name
     $tbl_name1 = "flight_webair";
    
      mysql_connect("$host", "$username", "$password")or die("cannot connect");
      mysql_select_db("$db_name")or die("cannot select DB"); 
   
   
    // Variables 
     $flight_route_out    = $_POST['flight_route_out'];
     $flight_route_return = $_POST['flight_route_return'];
     $date_out            = $_POST['departure_date'];
     $date_return         = $_POST['return_date'];
     $passenger_num       = $_POST['num_of_pass'];
     $one_way             = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first.
     
    
$nonUSdate1 = $date_out;
list($day,$month,$year) = explode('/',$nonUSdate1);
$newDate1 = "{$month}/{$day}/{$year}";
$stamp = strtotime($newDate1); 

    $nonUSdate2 = $date_return;
list($day,$month,$year) = explode('/',$nonUSdate2);
$newDate2 = "{$month}/{$day}/{$year}";
$stamp2 = strtotime($newDate2);

   //To protect MySQL injection
     $flight_route_out = stripslashes($flight_route_out);
     $flight_route_return = stripslashes($flight_route_return);
     $flight_route_out = mysql_real_escape_string($flight_route_out);
     $flight_route_return = mysql_real_escape_string($flight_route_return);
   
   //Queries
     $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'";
     //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'";
  //Execute  query  1
     $result = mysql_query($sql1) or die(mysql_error());

     
if ($stamp < $stamp2){
   echo "You cannot return before you leave!";
   }

       if(mysql_num_rows($result) > 0){       
?>      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

yes correct.

 

i get no output at all :( this sucks im never gona get this submitted in time!

 

lame.

 

thanks all the same

 

It works for me,

 

try echoing this:

 

    $date_out            = $_POST['departure_date'];
     $date_return         = $_POST['return_date'];

 

echo out those two vars and tell me what they give you.

yes correct.

 

i get no output at all :( this sucks im never gona get this submitted in time!

 

lame.

 

thanks all the same

 

It works for me,

 

try echoing this:

 

    $date_out            = $_POST['departure_date'];
     $date_return         = $_POST['return_date'];

 

echo out those two vars and tell me what they give you.

 

cant impliment that when i cant get any output...

 

will try and return all vars 1 sec

 

this doesnt not work either using print_r($_POST);

 

 

 

Shall i revert to this short term and add your changes. Atleast i had some browser output at that point.

 

<?php
print_r($_POST);
ini_set ("display_errors", "1");
error_reporting(E_ALL);

$error = FALSE;
   //database information
     $host      = "stocks"; // Host name
     $username  = "wbennett"; // Mysql username
     $password  = "mysql5"; // Mysql password
     $db_name   = "wbennett"; // Database name
     $tbl_name1 = "flight_webair";
    
      mysql_connect("$host", "$username", "$password")or die("cannot connect");
      mysql_select_db("$db_name")or die("cannot select DB"); 
   
   
    // Variables 
     $flight_route_out    = $_POST['flight_route_out'];
     $flight_route_return = $_POST['flight_route_return'];
     $date_return         = $_POST['return_date']; 
     $date_out            = $_POST['departure_date'];
     $passenger_num       = $_POST['num_of_pass'];
     $one_way             = (isset($_POST['one_way'])) ? $_POST['one_way'] : null; // make sure value is available first.
     

    
$nonUSdate1 = $date_out;
list($day,$month,$year) = explode('/',$nonUSdate1);
$newDate1 = "{$month}/{$day}/{$year}";
$stamp = strtotime($newDate1); 

    $nonUSdate2 = $date_return;
list($day,$month,$year) = explode('/',$nonUSdate2);
$newDate2 = "{$month}/{$day}/{$year}";
$stamp2 = strtotime($newDate2);

   //To protect MySQL injection
     $flight_route_out = stripslashes($flight_route_out);
     $flight_route_return = stripslashes($flight_route_return);
     $flight_route_out = mysql_real_escape_string($flight_route_out);
     $flight_route_return = mysql_real_escape_string($flight_route_return);
   
   //Queries
     $sql1="SELECT * FROM `$tbl_name1` WHERE `flight_route` = '$flight_route_out'";
     //$sql="SELECT * FROM $tbl_name1 WHERE flight_route_return='$flight_route_return'";
  //Execute  query  1
     $result = mysql_query($sql1) or die(mysql_error());

     
if ($stamp < $stamp2){
   echo "You cannot return before you leave!";
   }

       if(mysql_num_rows($result) > 0){       
?>      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta
     http-equiv="Content-Type"
     content="text/html; charset=iso-8859-1"
   />
    <link
     rel="stylesheet"
     href="dropdown2.css"
     type="text/css"
    />
    <script
     type="text/javascript"
       src="dropdown.js">
   </script>
    <script
      type="text/javascript"   
       src="calendar.js">
   </script>
   <script
      type="text/javascript"   
       src="enablefield.js">
   </script>
   <title> Booking Confirmation </title>
   <script
     type="text/javascript">
       function greyText(one_way, return_date)
       {
          if (document.form1[one_way].checked)
          {
           document.form1[return_date].disabled=true;
              document.form1[return_flight].disabled=true;
            }
        else
          {
              document.form1[return_date].disabled=false;
              document.form1[return_flight].disabled=false;
            }
        }
      <title>Webair Contact Us</title>
<link rel="StyleSheet" href="./mainstyle.css"type="text/css" media="screen">
     </script>
   </head>
   <body>
     <div id="wrapper">
       <table>
         <tr>
          <td>
             <img
            src="Webair--logo.gif"
              height= "65"
            width="240"
                 align="top"
            />
          </td>
          <td
           background="Banner--background.gif"
          height="60"
          align="right"
          width="817"
         >
              <a
              class="hyperlink"
              href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php">
           
              <b>
              Staff login
              </b>
            </a>
                 |   
              <a
              class="hyperlink"
             href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"
            >
           <b>
             Home
           </b>
           </a>
                |
             <a
             class="hyperlink"
            href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"
           >
             <b>
             Booked Flights
               &nbsp
             </b>
           </a>
   
          </td>
        </tr>
     </table>
     <dl
      class="dropdown"
    >
       <dt
        id="one-ddheader"
        onmouseover="ddMenu('one',1)"
         onmouseout="ddMenu('one',-1)"
      >
        Home
      </dt>
       <dd
        id="one-ddcontent"
        onmouseover="cancelHide('one')"
         onmouseout="ddMenu('one',-1)"
      >
         <ul>
           <li>
            <a
              href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"
             class="underline"
            >
              Home
            </a>
          </li>
         </ul>
      </dd>
     </dl>
     <dl
      class="dropdown"
    >
      <dt
       id="two-ddheader"
        onmouseover="ddMenu('two',1)"
        onmouseout="ddMenu('two',-1)"
     >
       Contact us
     </dt>
        <dd
        id="two-ddcontent"
        onmouseover="cancelHide('two')"
          onmouseout="ddMenu('two',-1)"
      >
       <ul>
           <li>
           <a
            href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact"
            class="underline"
          >
            Contact us
          </a>
         </li>
        </ul>
       </dd>
     </dl>
     <dl
      class="dropdown"
    >
       <dt
          id="three-ddheader"
       onmouseover="ddMenu('three',1)"
       onmouseout="ddMenu('three',-1)"
      >
        Flights
      </dt>
         <dd
          id="three-ddcontent"
         onmouseover="cancelHide('three')"
           onmouseout="ddMenu('three',-1)"
       >
           <ul>
                         
            <li>
            <a
              href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_refunds.html"
             class="underline"
            >
              Refund Policy
            </a>
          </li>
           </ul>
         </dd>
     </dl>
     <dl
    class="dropdown"
    >
       <dt
        id="four-ddheader"
       onmouseover="ddMenu('four',1)"
         onmouseout="ddMenu('four',-1)"
      >
        Travel Information
      </dt>
         <dd
         id="four-ddcontent"
         onmouseover="cancelHide('four')"
           onmouseout="ddMenu('four',-1)"
       >
          <ul>
            <li>
           <a
               href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_flight_fares.html"
            class="underline"
           >
             Flight Timetable
           </a>
         </li>
            <li>
           <a
             href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_baggage.html"
            class="underline"
           >
             Baggage Information
           </a>
         </li>
            <li>
           <a
             href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_airport_info.html"
            class="underline"
            >
             Airport information
           </a>
         </li>
            <li>
           <a
             href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_travel_info.html"
            class="underline"
           >
             Travel documentation requirements
           </a>
           </li>
          </ul>
        </dd>
      </dl>
      <dl
       class="dropdown"
     >
      <dt
       id="five-ddheader"
      onmouseover="ddMenu('five',1)"
        onmouseout="ddMenu('five',-1)"
     >
       About Webair
     </dt>
        <dd
        id="five-ddcontent"
        onmouseover="cancelHide('five')"
          onmouseout="ddMenu('five',-1)"
      >
          <ul>
            <li>
           <a
             href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html"
            class="underline"
           >
             About Webair
           </a>
          </li>
            <li>
           <a
              href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html"
            class="underline"
           >
             Contact us
           </a>
          </li>
          </ul>
        </dd>
      </dl>
     <div
       style="clear:both"
      />
    </div>
      <div
       id="content"
     >
     <div
       id="table_gen_1"
     >
      <div
         class="inner"
      >
      <br>
   
<?php

//THERE IS AN ERROR display error message 
if($error == TRUE)
{
    echo '<h1>' . $output . '</h1>';
}
else {
?>

<h1><center> Confirm Booking </center></h1>
<h3><b><u> Out-going Flight Information: </u></b></h3>

<?php 

while($row = mysql_fetch_array($result)){
   echo "

          <br><br>

   <table border='1' cellpadding=10>  
     <tr>
      <td class='table'>
         <center><b>
         Flight Number
       </b></center>
       </td>
      <td class='table'>
        <center><b>
           Flight Route Selected
       </b></center>
      </td>
      <td class='table'>
        <center><b>
          Departure Time
        </b> </center>  
      </td>
      <td class='table'>
        <center><b>
         Arrival Time 
        </b></center> 
      </td> 
      <td class='table'>
        <center><b>
         Departure Date
       </b></center>
      </td>
      <td class='table'>
        <center><b>
         Return Date
       </b></center>
      </td>
      <td class='table'>
         <center><b>
         Number of Passengers Selected
       </b></center>
      </td>
     </tr>
     <tr>
      <td class='table'>
        <center>
           ".$row['flight_num']." 
        </center>
      </td>
      <td class='table'>
        <center>
          ".$row['flight_route']." 
        </center>
       </td>
      <td class='table'>
        <center>
         ".$row['departure_time']."
        </center> 
      </td>
      <td class='table'>
        <center>
         ".$row['arrival_time']."
        </center> 
      </td>
      <td class='table'>
        <center>
          ".$date_out."
        </center>
      </td>
      <td class='table'>
        <center>
          ".$date_return."
        </center>
      </td>
      <td class='table'>
        <center>
          ".$passenger_num['num_of_pass']." 
       </center>
      </td>
    </tr> 
   </table>

        <br><br>"; 
}  
}
?>

</div>
</div>
</div>
<div id="footer">
<div id="inner">
<div id="footer2">
<p><hr class="line"></hr>
<a class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/main_logon.php"><b>Staff login</b></a>
     |   
    <a  class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/index.html"><b>Home</b></a>
    |
    <a  class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_contact.html"><b>Contact us</b></a>
    |
    <a  class="hyperlink2" href="http://www.cems.uwe.ac.uk/~wbennett/webair/webair_about.html"><b>About Webair</b></a>
   
<hr class="line2"></hr>
</p>
</div>
</div>
</div>
     </body>
     </html>
   
     <?php
     
     }else{
      
     echo 'Sorry, couldn\'t find any flights';
    
    }       
         
mysql_free_result($result);   
?>

 

maybe useful

 

this has held me up so much i have loads left to do for tomorrow morning, how lame  going to be a all nighter!

sorry went eating..

 

will dont make it so hard on yourself man,

 

its simple just add this after your vars

 

  echo $_POST['departure_date'];
     echo $_POST['return_date'];

 

Array ( [flight_route_out] => Bristol - Newcastle [departure_date] => 23/12/2008 [flight_route_return] => Bristol - Newcastle [return_date] => 23/12/2008 [num_of_pass] => 1 [submit] => Submit ) 23/12/200823/12/2008

 

there is that any help? it also returned everything from the where loop and layout stuff

 

thanks i wont be, i just hate deadlines.

sorry went eating..

 

will dont make it so hard on yourself man,

 

its simple just add this after your vars

 

  echo $_POST['departure_date'];
     echo $_POST['return_date'];

 

Array ( [flight_route_out] => Bristol - Newcastle [departure_date] => 23/12/2008 [flight_route_return] => Bristol - Newcastle [return_date] => 23/12/2008 [num_of_pass] => 1 [submit] => Submit ) 23/12/200823/12/2008

 

there is that any help? it also returned everything from the where loop and layout stuff

 

thanks i wont be, i just hate deadlines.

 

okay now print out the $stamp and $stamp 2

sorry went eating..

 

will dont make it so hard on yourself man,

 

its simple just add this after your vars

 

  echo $_POST['departure_date'];
     echo $_POST['return_date'];

 

Array ( [flight_route_out] => Bristol - Newcastle [departure_date] => 23/12/2008 [flight_route_return] => Bristol - Newcastle [return_date] => 23/12/2008 [num_of_pass] => 1 [submit] => Submit ) 23/12/200823/12/2008

 

there is that any help? it also returned everything from the where loop and layout stuff

 

thanks i wont be, i just hate deadlines.

 

okay now print out the $stamp and $stamp 2

 

Here the result mate:

 

Array ( [flight_route_out] => Bristol - Newcastle [departure_date] => 23/12/2008 [flight_route_return] => Bristol - Newcastle [return_date] => 16/12/2008 [num_of_pass] => 1 [submit] => Submit ) 16/12/200823/12/200812299904001229385600

Array ( [flight_route_out] => Bristol - Newcastle [departure_date] => 31/12/2008 [flight_route_return] => Bristol - Newcastle [return_date] => 17/12/2008 [num_of_pass] => 1 [submit] => Submit ) 17/12/2008  31/12/2008  12306816001229472000

 

its swapping the order round some where, ive got them the wrong way round at some point but im not sure where, (which is right and which is wrong) compare the talbe and the array in the screenshot!

fix1pa9.th.jpg

http://img254.imageshack.us/my.php?image=fix1pa9.jpg

 

do u c what i mean?

Array ( [flight_route_out] => Bristol - Newcastle [departure_date] => 31/12/2008 [flight_route_return] => Bristol - Newcastle [return_date] => 17/12/2008 [num_of_pass] => 1 [submit] => Submit ) 17/12/2008  31/12/2008  12306816001229472000

 

its swapping the order round some where, ive got them the wrong way round at some point but im not sure where, (which is right and which is wrong) compare the talbe and the array in the screenshot!

fix1pa9.th.jpg

http://img254.imageshack.us/my.php?image=fix1pa9.jpg

 

do u c what i mean?

 

 

 

Array ( [flight_route_out] => Bristol - Newcastle [departure_date] => 31/12/2008 [flight_route_return] => Bristol - Newcastle [return_date] => 17/12/2008 [num_of_pass] => 1 [submit] => Submit ) 17/12/2008  31/12/2008  12306816001229472000

 

its swapping the order round some where, ive got them the wrong way round at some point but im not sure where, (which is right and which is wrong) compare the talbe and the array in the screenshot!

fix1pa9.th.jpg

http://img254.imageshack.us/my.php?image=fix1pa9.jpg

 

do u c what i mean?

 

 

 

scrap that i was wrong, the return date is before the depart date

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.