Results 1 to 2 of 2

Thread: searching.....

  1. #1
    Join Date
    Feb 2004
    Location
    Klang Bandar Diraja
    Posts
    160
    Rep Power
    193

    searching.....

    // find.parse.php
    //------------------------------------------------------------------------------
    <?php
    include 'Connections/star.php'; // connection to database file cmd
    session_start();

    if(!$_POST)
    {
    echo "Anda perlu memasukkan kata kunci bagi pencarian anda";
    echo "<META HTTP-EQUIV='REFRESH' CONTENT ='0; URL = find.php'>";
    }
    else
    {
    $key = $_POST['keyword'];
    $search_by = $_POST['search_by'];
    echo $search_by;
    echo $key;

    $result= mysql_query("SELECT * FROM user_details WHERE $search_by LIKE %."$key".%");

    if ($result)
    {
    echo 'search ok!';
    }
    else
    {
    echo 'search failed!';
    }
    }
    ?>
    //---------------------------------------------------------------------------
    //-- find.php file

    ..
    ..
    <table width="450" height="350" border="0" align="center" cellpadding="0" cellspacing="0" class="maincontentbox">
    <tr>
    <td class="maincontentbox"> <p class="header">cari allSTARian</p>
    <form name="search_members" action="find.members.parse.php" method="post">
    <table width="321" border="0" align="center" cellpadding="2" cellspacing="0">
    <tr>
    <td width="151" class="formstyle">Masukkan Katakunci </td>
    <td width="162"><input type="text" name="keyword" ></td>
    </tr>
    <tr>
    <td colspan="2"><p class="formstyle">Pilih Fungsi Carian :</p>
    <table width="200" border="0" align="center" cellpadding="0" cellspacing="0" class="para">
    <tr>
    <td><label>
    <input name="search_by" type="radio" value="user_fullname" checked>
    Nama Penuh</label></td>
    </tr>
    <tr>
    <td><label>
    <input type="radio" name="search_by" value="user_name">
    Nama Pengguna</label></td>
    </tr>
    <tr>
    <td><label>
    <input type="radio" name="search_by" value="user_startdate">
    Tahun Masuk</label></td>
    </tr>
    <tr>
    <td><label>
    <input type="radio" name="search_by" value="user_finishdate">
    Tahun Keluar</label></td>
    </tr>
    <tr>
    <td><label>
    <input type="radio" name="search_by" value="user_district">
    Daerah </label></td>
    </tr>
    <tr>
    <td><label>
    <input type="radio" name="search_by" value="user_state">
    Negeri</label></td>
    </tr>
    <tr>
    <td><label>
    <input type="radio" name="search_by" value="user_postcode">
    Poskod</label></td>
    </tr>
    </table>
    <p align="center">
    <input type="submit" name="Submit" value="Cari !">
    </p>
    <p>&nbsp;</p><p>&nbsp; </p>
    <p>&nbsp;</p></td>
    </tr>
    </table>
    </form>
    ..
    ..

    //-------------------------------------------------------------------------------

    user_details tu table dlm database...
    pecah kaca pecah gelas,
    sudah baca harap balas!
    TQ..

  2. #2
    Join Date
    Feb 2004
    Location
    Klang Bandar Diraja
    Posts
    160
    Rep Power
    193
    yg form action tu : find.parse.php .. itu jekkk.. tersilap...!
    To follow the path:
    Look to the master,
    Follow the master,
    Walk with the master,
    See through the master,
    Become the master.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. searching for mentor/job
    By shunkhai in forum Mamak Stall
    Replies: 6
    Last Post: 03-09-2008, 07:41 PM
  2. ASp-searching
    By cloudy in forum Website Programming
    Replies: 2
    Last Post: 23-05-2007, 08:59 AM
  3. Text searching
    By Chubby21 in forum Website Programming
    Replies: 6
    Last Post: 09-05-2007, 03:43 PM
  4. searching for asp.net project
    By lighching in forum Other Webmaster-related Services and Promotion
    Replies: 2
    Last Post: 05-08-2005, 01:31 PM
  5. Searching for JOBS?
    By JobListed in forum Websites Review and Suggestion
    Replies: 0
    Last Post: 17-05-2005, 04:58 PM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112