Jump to content

searching content from a database


deathadder

Recommended Posts

did you read what i said at all? what can i do with a drop down menu?

 

Yes I read what you wrote, lack of punctuation,  misspellings, and omitted words and all.  It's a piss poor attempt at a question, but despite that fact, I did my best to interpret what you're after, by consulting tea leaves, and using my vast experience answering noobs with only a passing acquaintance with the English language and no idea how to pose a proper technical question.  In short people exactly like you.

 

Did you look at the link?  It is a combination of javascript libraries that lets you create a DROP DOWN LIST which includes pictures along with the elements.  Since you brought up a search box, the general trend these days is to ajax search, and do incremental results which are displayed in a listbox.  I put 2 and 2 together and took my best shot, because frankly, I don't have time to babysit you in coaxing out some clarity.  Because you were rude, and disrespectful, I'm warning you now, that if you don't shape up, your time here on phpfreaks can be ended quite effectively with a couple of clicks of my mouse.

 

You are the one who mentioned search box, and then described your desire for picture/text/price combined.  If that is not what you're after, you really need to work on your command of the written word. 

 

If you're asking how to store an actual image in a database column, that can be done but it is not advisable in most cases.  Most people store the images in a directory structure, and a column that contains the path to the location where the image is stored on disk.

 

Despite this, if you want to try and store images in a database column you would need to use a blob type.

 

Last but not least, nobody is going to feed you code, that is not what we do here.  I gave you some pointers and that is all I'm going to do right now.  If you have specific questions you're free to ask them, but otherwise, I expect you to provide more specifics, and we should be seeing some code very soon if you want to pursue this. 

 

 

 

 

Link to comment
Share on other sites

i want a search thing like this http://www.near-reality.com/market/  how can i search with a javascript drop down menu?\

 

i dont mind so much about the search without refreshing but i want a basic search thing like that

 

The basic principle is exactly the same as what I provided you a link to.  The moving parts are the jquery.post which will let you send post data to your php script that looks up the data in the database and returns the results.  There are plugins like http://jqueryui.com/demos/autocomplete/ or the combo I linked you to originally that take care of a couple of issues like handling how many characters are required before the post is first sent to the server.

 

In short this is done with javascript, and specifically you are best off using the jquery library, and applicable jquery plugins. 

 

Do you know enough javascript to use jquery?  Do you understand how to use innerhtml?

 

 

Link to comment
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.