Re: localhost versus remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I also provide my searchform here. The problem I have is that everything
works when run on my localhost (which is my testing location before upload.
I have the exact same code local and remote.

My searchform should pass the code..... here it comes:

  <form method=GET action=aviation/result.php target=frameData>
    <table>
      <tr>
        <td width="122"></td>
        <td ></td>
      </tr>
      <tr>
        <td class="text">Icao code:</td>
        <td > <input name=icao type=text class=search size="3"
maxlength="3">
        </td>
      </tr>
      <tr>
        <td class="text" >Airline name:</td>
        <td > <input type=text name=name class=search> <br> </td>
      </tr>
      <tr>
        <td class="text" >Country:</td>
        <td > <select name=country class=search>
            <?PHP
 $query = "SELECT DISTINCT(Field3) FROM $table ORDER BY Field3";
 $result = mysql_query($query) or die("Error in query");

 while($row = mysql_fetch_assoc($result))
  {
  print "<option>".$row['Field3']."</option>\n";
  }
?>
          </select> </td>
      </tr>
      <tr>
        <td class="text" >Search Criteria:</td>
        <td> <select name=ton>
            <option value=AND>AND</option>
            <option value=OR>OR</option>
          </select> </td>
      </tr>
      <tr>
        <td><span class="text">Sort by:</span> </td>
        <td> <select name="sort">
            <option value=Field1>Designator</option>
            <option value=Field2>Name</option>
            <option value=Field3>Country</option>
          </select> </td>
      </tr>
      <tr bgcolor="#FFFFFF">
        <td></td>
        <td> <input type=submit value="Search these criteria"> </td>
      </tr>
      <tr bgcolor="#CCCCCC">
        <td colspan=2 class=grey> <div align="center"
class="signature">***no wildcards permitted***</div></td>
      </tr>

    </table>
  </form>

Thanx, and excuse my newbie ignorance,
Jacco
--
http://seabird.jmtech.ca

Attitude is Everything!
But Remember, Attitudes are Contagious!
Is Yours worth Catching????
"John W. Holmes" <holmes072000@charter.net> wrote in message
002601c27e08$680a2a50$7c02a8c0@coconut">news:002601c27e08$680a2a50$7c02a8c0@coconut...
> > MySQL Error: You have an error in your SQL syntax near 'Field2 LIKE
> '%%'
> > Field3 LIKE '%%' ORDER BY ' at line 2
> > SQL: SELECT * FROM airline_a WHERE Field1 LIKE '%%' Field2 LIKE '%%'
> > Field3
> > LIKE '%%' ORDER BY
>
> You need some ANDs between each of your field LIKE '%%' clauses.
>
> WHERE field1 LIKE '%%' and field2 LIKE '%%' ...
>
> ---John Holmes...
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux