(08-25-2015, 08:48 PM)Doge Wrote: How do I do my search engine better? Atm, if some post have "mathematics" for example, it finds it if you put "mathematics" in search box but if you put "math" into that search box it wont work.
Code:
<form action="http://quoteship.uk/search" name="input" method="get">
<input value=" " name="q" size="17" type="text"/>
<input value="Search" type="submit"/>
</form>
Thanks! B-)
If you are using a relational database, your query for searching would be something like this.
Code:
SELECT id FROM posts WHERE title LIKE "math%";
This query would give you results that have math and then something appended to the end of it like math, mathematics, mathabc, etc.
You could also do this...
Code:
SELECT id FROM posts WHERE title LIKE "%math%";
This query would give you similar results but now it will search for words/letters inserted in front of "math" too.
EDIT: If this isn't smart enough searching for you, I would suggest looking into implementing fuzzy search.
(09-07-2015, 03:27 PM)Doge Wrote: Dumping, still looking answer for that search thing.
Also quick question, how do I center image?
Code:
<!doctype html>
<a href="http://supremeforums.com/member.php?action=register&referrer=48">
<img border="0" src="http://i.imgur.com/FB0OHOj.png" width="252" height="31" />
</a>
</!doctype>
If you want to center it relative to its parent's width horizontally, use css similar to this:
Code:
a {
position: relative;
margin: 0 auto;
}