Log user searches

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Zues
Forum Newbie
Posts: 2
Joined: Mon Jun 13, 2005 10:22 am

Log user searches

Post by Zues »

Hello how difficult is it to record user searches using php ? I run an eCommerce store and would like to be able to track user searches.
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

create another table in your database.
each time the search form is submitted, add a row in the table with the time and search terms.
Zues
Forum Newbie
Posts: 2
Joined: Mon Jun 13, 2005 10:22 am

Thanks

Post by Zues »

Anychance you know the technical term of what i am trying to do? So I may search on how to due this.

As you can tell im new to this and dont mind doing it on my own just cant seem to find any relevant matches when I search for anything on the search engines.

I am thinking also due to the possible amount of searches this may not be a good idea to store it in the database might be a better option to store it in a log file. (perhaps) just thinking ahead is all
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

All you're asking to do is just save user searches. There's not a lot, technically, to do for this functionality, so I doubt you'll find tutorials or anything on how to do this. Doing what ~Skara suggested is probably the best and easiest way to do it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply