August 31, 201016 yr Hi all, apologies for this, as it is possibly a really daft question. however... I've just made a website, well, bought a template anyway. It has search function which i wish to get working I was just reading this on my break in work - http://www.110mb.com/forum/search-function-in-php-t19128.0.html is it essential to have an actual database set up to have a search function? can you not just search the website content rather than a database? thanks alot
August 31, 201016 yr First and foremost, you need to have server-side script to search your website, in your case PHP I would imagine. In theory, you can avoid the use of a database, but... if your content is in a database then you have no choice. If your content is in pure HTML, then you could actually search that through PHP, but this would be more complicated. So I would say you do need to focus on the use of a database for the search function.
August 31, 201016 yr Author First and foremost, you need to have server-side script to search your website, in your case PHP I would imagine. In theory, you can avoid the use of a database, but... if your content is in a database then you have no choice. If your content is in pure HTML, then you could actually search that through PHP, but this would be more complicated. So I would say you do need to focus on the use of a database for the search function. thanks mate, I've basically just done the w3 course in php; I'm doing the website to get a go and putting a few things into practice. I'll have a go when I get home. thanks again
September 1, 201016 yr Author ...so if I want the search function to search a static website, (rather than a retail website with a database of products or something similar) Would I still need a database? thanks
September 1, 201016 yr You might be slightly over comlicating the issue. Take a look at the google custom search tool; http://www.google.com/cse/ It might just do exactly what you want.
Create an account or sign in to comment