harkly Posted April 2, 2009 Share Posted April 2, 2009 Not sure where this question belongs. I have a basic search function on my site and I want to be able to log what people are searcing for. I have googled it but not getting anything useful, may be using the wrong terminology. Anyone have any sites that talk about this? Just looking to be headed in the right direction. My search form - site is done in PHP & MySql <div id='search'> <h3><form name='search' method='get' action='ifElse.php' onsubmit='return checkform(this);'> Search <select NAME='field'> <option value='all'>All</option> <option value='artist'>Artists</option> <option value='artwork'>Art Works</option> <option value='keywords'>Keywords</option> </Select> for <input type='text' name='find' /> <input type='submit' name='search' value='Find' /> </form></h3> </div> Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/ Share on other sites More sharing options...
Maq Posted April 2, 2009 Share Posted April 2, 2009 What's your question? If you want to store what they searched then you need a table in your DB and when they submit their search, you have to grab the POST values of the fields and INSERT them into the table. Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799784 Share on other sites More sharing options...
harkly Posted April 2, 2009 Author Share Posted April 2, 2009 "I have a basic search function on my site and I want to be able to log what people are searcing for. " How do I do that is my question. Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799796 Share on other sites More sharing options...
shlumph Posted April 2, 2009 Share Posted April 2, 2009 you have to grab the POST values of the fields and INSERT them into the table. Is your answer Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799797 Share on other sites More sharing options...
Maq Posted April 2, 2009 Share Posted April 2, 2009 "I have a basic search function on my site and I want to be able to log what people are searcing for. " How do I do that is my question. I already told you. Create a table with the information you want to store (user name, date, time, search word, etc...) and insert it into your table when the user submits their search. If you don't know how to do that, then ask a little more of a specific question. There are a lot of tutorials on how to insert into a database with PHP and MySQL. Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799801 Share on other sites More sharing options...
harkly Posted April 2, 2009 Author Share Posted April 2, 2009 Merely responding to your question. Got the rest of your answer, didn't know what you were confused about. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799836 Share on other sites More sharing options...
Maq Posted April 2, 2009 Share Posted April 2, 2009 Merely responding to your question. Got the rest of your answer, didn't know what you were confused about. Thank you Yeah sorry, I think we just had a miscommunication issue. Let me know if I answered your question. Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799845 Share on other sites More sharing options...
redarrow Posted April 2, 2009 Share Posted April 2, 2009 harkly don't worry mate, continue asking questions, that how someone learns on a forum. What the problem is in reality, programmer like maq helps loads of people daily, and other programmers throw there examples in to prove there a programmer, and it makes programmers like maq get stressed from time to time it natrual trying to get a point across in a forum. i am always told of lol. you no what i mean good programmer like maq re written php manual on here, he such a life saver, only wants a thank u. Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799930 Share on other sites More sharing options...
Maq Posted April 2, 2009 Share Posted April 2, 2009 harkly don't worry mate, continue asking questions, that how someone learns on a forum. harkly, please by all means ask as many questions as you'd like. I didn't mean to give you the impression that I get tired of answering questions, after all, this is why I'm here, I like helping people. Thx redarrow Quote Link to comment https://forums.phpfreaks.com/topic/152297-capture-search-terms/#findComment-799936 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.