Obsessed with Coding Posted October 2, 2006 Share Posted October 2, 2006 I probably sound like a n00b asking this but I'm trying to make a search form for my site. I know how to make one that leads to google but not for my site.So I know what the html is on the page itself but what about the "action= " I'm not sure what do do there.Thanks in advance! Link to comment Share on other sites More sharing options...
www.mihalism.com Posted October 2, 2006 Share Posted October 2, 2006 A simple HTML search form would be like <form method="post" action="search.php"><input type="text" name="term" id="term" value="Enter search keyword"> <br /><input type="submit" value="Search"></form> for the actual search processing you shoud use PHP Link to comment Share on other sites More sharing options...
jesh Posted October 2, 2006 Share Posted October 2, 2006 Building a search engine can be quite a bit of work and I agree that you'll need PHP (or C#/VB and .NET) as well as a database. SQL Server and MySQL both allow FREETEXT searching on the database which can make finding results much easier.Here are a couple resources that might help (or cause great confusion )How a Search Engine WorksPopulating a Search Engine with a C# Spider Link to comment Share on other sites More sharing options...
eguru Posted October 2, 2006 Share Posted October 2, 2006 building a searchengine like google or others is not possible through PHP and MYSQL, you need to go for .net or java with oracle as backend. Link to comment Share on other sites More sharing options...
holmedwa04 Posted October 2, 2006 Share Posted October 2, 2006 Isn't there jut some simple code that you could use that will search your site and then cough up the results? Link to comment Share on other sites More sharing options...
eguru Posted October 2, 2006 Share Posted October 2, 2006 yes that can be done easily with PHP and MYSQL, but check in case of spidering technology now adopted by Search engines. Link to comment Share on other sites More sharing options...
Obsessed with Coding Posted October 3, 2006 Author Share Posted October 3, 2006 A simple HTML search form would be like<form method="post" action="search.php"><input type="text" name="term" id="term" value="Enter search keyword"> <br /><input type="submit" value="Search"></form> for the actual search processing you shoud use PHP Yes that's the part I know, but what would then go in "search.php"? That's where I get lost.Isn't there jut some simple code that you could use that will search your site and then cough up the results?That's the kind I'm looking for, I'm not building a whole search engine Link to comment Share on other sites More sharing options...
aspnetguy Posted October 3, 2006 Share Posted October 3, 2006 next question is the data in a database or must the search.php search the actual files? Link to comment Share on other sites More sharing options...
reportingsjr Posted October 3, 2006 Share Posted October 3, 2006 building a searchengine like google or others is not possible through PHP and MYSQL, you need to go for .net or java with oracle as backend. That would be wrong, it is very possible to create a search engine like google with PHP and MySQL!Dcole actually is making one right now, I think he just has several bugs to sort out. His site is at dcole.ath.cx, but im not sure if its all the way up yet. Link to comment Share on other sites More sharing options...
Obsessed with Coding Posted October 3, 2006 Author Share Posted October 3, 2006 next question is the data in a database or must the search.php search the actual files?The actual files Link to comment Share on other sites More sharing options...
aspnetguy Posted October 4, 2006 Share Posted October 4, 2006 building a searchengine like google or others is not possible through PHP and MYSQL, you need to go for .net or java with oracle as backend.Yea and no...it can be done but it will not be as fast as google. Google most likely uses C or C++ on the backend to get the speed.I have created a spider in C# that crawls URLs much like Google (not nearly as good tho).Since you need to search the files you will have to open up each of the files you need to search and search for the keywords. The C# function is IndexOf(), I thinkt he php equiv is strpos() but I am not 100% sure. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now