hello guys!
I started using PHP not many days ago, so I'm a nubbie.
Still, I really like even if i'm finding it quite hard.
Right now I'm trying to create a little search engine, and I'm almost there, but there is something which I can't figure out.
this is what I've done until now:
<?php
if ($_POST["name"]=="cat")
Header("Location:database/cat.php");
else
echo "not in the database";
?>
So when I write in my search engine (which is obviously in another page) the word cat, it will open the page "cat" which i've got in a folder. if i write anything else it will say "not in the database"
now: i don't want to have just the word "cat" giving me a result, but all the words that i've got in my database.
therefore what i would like my search engine to do it to search for the word (which can be cat, or dog, or whatever) in my database; if it finds it then it brings me to the page of that word (every word in my database has its own page), if it doesn't it says: "not in the database"
Do you know how I could do it?
I hope I've been clear enough XD
thx guys