SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Advanced search

  1. #1
    SitePoint Zealot php.net's Avatar
    Join Date
    Oct 2003
    Location
    php.net
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Advanced search

    hello

    if i have this table informations :
    PHP Code:
    iID
    iTitle
    iCity
    iDetails
    sID 
    and this table sections :
    PHP Code:
    sID
    secName 
    i need to make page search.php :

    to get all city in page

    PHP Code:
    <select name="cib" size="1">
    <option value="mmm" selected>All City</option>
    <?php
      
    while ($cat mysql_fetch_array($city)) {
        
    $id $cat["iID"];
        
    $cname htmlspecialchars($cat["iCity"]);
        echo(
    "<option value='$id'>$cname</option>");
      }
    ?>
    </select>

    and to get all sections in page

    PHP Code:
    <select name="cib2" size="1">
    <option value="mmm" selected>all sections</option>
    <?php
      
    while ($cat mysql_fetch_array($cats)) {
        
    $id $cat["sID"];
        
    $cname2 htmlspecialchars($cat["secName"]);
        echo(
    "<option value='$id'>$cname2</option>");
      }
    ?>
    </select>

    i need to search by :
    **search by words in
    -chose all sections or 1 section
    -chose all city or 1 city
    -top price and get me in result page all order ander this price

    thanks all

  2. #2
    SitePoint Zealot php.net's Avatar
    Join Date
    Oct 2003
    Location
    php.net
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    any one can help

  3. #3
    SitePoint Zealot php.net's Avatar
    Join Date
    Oct 2003
    Location
    php.net
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  4. #4
    SitePoint Zealot mrWoot's Avatar
    Join Date
    Jan 2004
    Location
    Wisconsin
    Posts
    131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try the "search" function on the forums.. (ha ha, i make joke)

  5. #5
    SitePoint Zealot php.net's Avatar
    Join Date
    Oct 2003
    Location
    php.net
    Posts
    162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks man for this joke !!!

    i know search in database by LIKE Not ( search function )



    any one help


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •