deathadder Posted January 14, 2012 Share Posted January 14, 2012 so ik you cna get a search box to search items or text in a database, but what i want to know is how to manually insert text and images into it example image (imagine its an image) text name - text price how would i do this? Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/ Share on other sites More sharing options...
gizmola Posted January 14, 2012 Share Posted January 14, 2012 Here's a good way: http://www.marghoobsuleman.com/jquery-image-dropdown Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/#findComment-1307484 Share on other sites More sharing options...
deathadder Posted January 14, 2012 Author Share Posted January 14, 2012 did you read what i said at all? what can i do with a drop down menu? Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/#findComment-1307496 Share on other sites More sharing options...
gizmola Posted January 14, 2012 Share Posted January 14, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/#findComment-1307501 Share on other sites More sharing options...
deathadder Posted January 16, 2012 Author Share Posted January 16, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/#findComment-1308060 Share on other sites More sharing options...
gizmola Posted January 16, 2012 Share Posted January 16, 2012 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? Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/#findComment-1308262 Share on other sites More sharing options...
deathadder Posted January 17, 2012 Author Share Posted January 17, 2012 a limited amount, but a peice of code i could use would be greatly appreciated Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/#findComment-1308476 Share on other sites More sharing options...
QuickOldCar Posted January 17, 2012 Share Posted January 17, 2012 Here's an ajax based search with dropdown. http://www.dynamicajax.com/fr/AJAX_Suggest_Tutorial-.html Quote Link to comment https://forums.phpfreaks.com/topic/254991-searching-content-from-a-database/#findComment-1308484 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.