Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7683321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T18:46:06+00:00 2026-05-31T18:46:06+00:00

The code I used doesn’t give me any MySQL errors (which is good) Except

  • 0

The code I used doesn’t give me any MySQL errors (which is good)

Except it won’t display the results I was looking for (in the url bar it looks like this search.php?departure_label=Dar+Es+Salaam&arrival_label=Zanzibar&txtDate1=03%2F19%2F2012&txtDate2=03%2F20%2F2012&ddlPAxADT=1&ddlPaxCHD=0&ddlPaxINF=0&search=Submit which is what I wanted since it means all of the information was passed through)

It just displays a white screen

Here’s the code

<?PHP   
$button = $_GET['submit'];
$search = $_GET['search'];
$sfrom = $_GET['departure_label'];
$sfromda = $_GET['txtdate1'];
$sto = $_GET['arrival_label'];
$stoda = $_GET['txtdate2'];
$padt = $_GET['ddlPaxADT'];
$pchd = $_GET['ddlPaxCHD'];
$pinf = $_GET['ddlPaxINF'];


include "connection.php";       
$result=mysql_query("SELECT * from search_v where rout_from like'".$sfrom."' and rout_to like'".$sto."' and DATE_FORMAT(date_avialable,'%Y-%m-%d') between'".$sfromda."' and '".$stoda."' LIMIT 10") or die(mysql_error());         
while($runrows = mysql_fetch_assoc($result)){ 

$flightid = $runrows['flight_id'];
$aseats = $runrows['seats_avialable'];
$todate = strftime("%b %d, %Y %l:%M %p" ,strtotime($runrows['to_date']));
$date = strftime("%b %d, %Y %l:%M %p" ,strtotime($runrows['date_avialable']));
$from = $runrows['rout_from'];
$to = $runrows['rout_to'];
$acost = $runrows['adult_cost'];
$ccost = $runrows['child_cost'];
$cur = $runrows['currency'];
$oth = $runrows['other_cost'];

echo "";                
?>
<li class="item clearfix"> <span
 id="cntntMiddle_ctl01_rptmain_lblFromt_0">
    <table cellpadding="0" cellspacing="0">
      <thead><tr>
        <th class="price">Price</th>
        <th>From</th>
        <th>To</th>
        <th>Depart</th>
        <th>Arrive</th>
      </tr>
      </thead><tfoot> <tr>
        <td><a class="more" href="#">Full
Details</a></td>
        <td colspan="6">
        <div class="select-wrap">
        <p class="seats"><strong><?php echo $aseats; ?></strong> <span>seats
left</span> <em>at this price</em></p>
        <button class="btn-select" type="button"
 onclick='return ray.ajax("#");'>Select Flight</button></div>
        </td>
      </tr>
      </tfoot><tbody>
        <tr>
          <td class="price" rowspan="2"><a
 style="font-weight: bold; cursor: pointer; text-decoration: none;"
 herf="#" onclick='return ray.ajax("#");'><span
 style="font-size: 24px; font-weight: bold;"><?php echo $totalcost; ?></span><span
 style="font-size: 11px; margin-top: 2px; display: block; color: rgb(255, 255, 255); text-align: center; font-weight: normal;">per
adult</span><span
 style="font-size: 12px; margin-top: 2px; display: block; color: rgb(255, 255, 255); text-align: center; font-weight: normal;">(with fees)</span></a></td>
          <td><?php echo $from; ?></td>
          <td><?php echo $to ?></td>
          <td style="padding-right: 2px;">4:05 PM</td>
          <td>7:05 PM</td>
        </tr>
      </tbody>
    </table>
    </span> <a
 id="cntntMiddle_ctl01_rptmain_lblResultDetails1_0" title="1"
 href="javascript:__doPostBack('ctl00$cntntMiddle$ctl01$rptmain$ctl00$lblResultDetails1','')"
 style="color: Black;"></a><a class="close"
 href="#">Close</a>
    <div class="info clearfix">
    <div class="info clearfix">
    <h4>Departing Flight</h4>
    <ul class="clearfix">
      <li>
        <h5><?php echo $from; ?> to <?php echo $to; ?> <?php echo $date; ?></h5>
        <ul>
          <li>&nbsp;</li>
          <li><strong>Flight #</strong> - <?php echo $flightid; ?></li>
          <li><strong>Departure Time – </strong>
6:05 PM</li>
<li><strong>Arrival Time</strong> - 5:05 PM</li>
        </ul>
      </li>
    </ul>
      <ul>
        <li style="padding-top: 5px;"><span
 style="color: rgb(212, 22, 13); font-weight: bold; font-size: 11px; text-decoration: none;">
Fare Breakdown</span> </li>
      </ul>
      <table class="more">
        <tbody>
          <tr>
            <th>Passenger</th>
            <th>Fare</th>
            <th> Taxes and Fees</th>
            <th>Qty</th>
            <th>Total Cost</th>
          </tr>
        </tbody><tbody>
          <tr>
            <td>Adult</td>
            <td
 style="color: rgb(100, 100, 100); font-size: 11px; font-weight: bold;"><?php echo $acost; ?></td>
            <td><?php echo $oth; ?></td>
            <td id="paxAdtTd">1</td>
            <td><?php echo $totaladult; ?></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>Cost of Sale(<?php echo $cur; ?>)</td>
            <td>&nbsp;</td>
            <td
 style="color: rgb(100, 100, 100); font-size: 14px; font-weight: bold;"><?php echo $totaladult; ?></td>
          </tr>
        </tbody>
      </table>
      <br />
      <span style="font-weight: bold; padding-top: 10px;">
*Additional airline fees for baggage may apply</span>
      <div class="select-wrap">
      <p class="seats"><strong><?php echo $aseats; ?></strong> <span>seats
left</span> <em>at this price</em></p>
      <button class="btn-select" type="button"
 onclick='return ray.ajax("https://res.website.com/checkout.aspx?recommendation=1&subset=1&supplier=53&page=flightconfirm",1,this);'>Select
Flight</button></div>

<?php
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T18:46:07+00:00Added an answer on May 31, 2026 at 6:46 pm
    $result=mysql_query("SELECT * from search_v where rout_from like %'".$sfrom."'% and rout_to like %'".$sto."'% and DATE_FORMAT(date_avialable,'%Y-%m-%d') between'".$sfromda."' and '".$stoda."' LIMIT 10") or die(mysql_error());
    

    there were two (logical?) errors, with LIKE function, you didn’t use a wildcard % key, and in next LIKE occurance, for $sto you didn’t provide a blankspace.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This code used to work but doesnt any more. i used a breakpoint, and
Does some PDO::PARAM_??? exist which can be used for dates or timestamps? Sample code:
This bit of code used to work, and now it doesn't: var url =
The following code used to implement the instruction sllv $s0, $s1, $s2 which uses
This piece of code used to work in MVC 1 but it does not
Template code is not compiled until the template function is used. But where does
This code used to return my local ip address as 192.xxx.x.xxx but now it
I swear the following code used to work, even in IE7 but now i
Is there a way to find the number of lines of code used in
I'm currently refactoring/tidying up some old C code used in a C++ project, and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.