Jump to content

Recommended Posts

Hi all

 

I am trying to create a search form

 

I want to search by the following things

 

Gender - drop down options

Activities - mulitple select checkbox

 

The pre existing data would be in he form of this in the Mysql DB so the User id relates to all info relating to that member. the vlau is what needs to be searched and all matching entries need to be pulled out and displayed in the search results.

 

table_1

 

id user_id field_id value

36 62         17         Horse riding, reading, writing, movies, television

37 62         2         Female

        38    63            17            reading, writing, movies, television

37 63         2         Male

 

this then needs to be joined with a second table that hols the members details

 

table_2

userid status avatar   thumb

62   none        default.jpg  default_thumb.jpg

 

I then want to be able to display the results as such

 

echo "<table width="100%" border="0" cellspacing="0" cellpadding="4">
  <tr>
    <td rowspan="2"><img src='www.yourdomain.com/".$row['avatar']."'></td>
    <td>".row['value']."</td>
  </tr>
  <tr>
    <td> </td>
  </tr>
</table>

 

Can any one help e out please really stuck search high and low and just cannot seem to get it to work!

 

Link to comment
https://forums.phpfreaks.com/topic/150127-search-form-to-search-database/
Share on other sites

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.