Hello i am fairly new to css and html but i can pull my wait ish and i was wondering how would i make the search bar work on my site, i can make it so that you type a search term in there and click go but how do you make it function and search pages on my site?
<html> <body> <table cellspacing=8> <SCRIPT language="JavaScript"> function goGoogle(term){ var siteURL = "yoursite.com "; var googURL = "http://www.google.com/search?q=site:" + siteURL + term; window.location = googURL;} </SCRIPT> <tr><td><h2>Search</h2></td></tr><tr> <form> <td align=right><input type=text name="theSearch" size=40></td></tr> <tr><td align=right> <input type=button value="Search" onClick='goGoogle(theSearch.value);'> </form> </td></tr> </table> </body> </html> Change yoursite.com with your site's domain name. You can also change <h2>Search<2> and button value="Search" with the text you want.
So this would be on goggle if i searched it? How would i make a search function that woudl allow me to search my site with out leaving to Google like any other normal site I got this tutorial it looks fine but how do i do the php i have no experience in it. http://www.dot-silver.co.uk/index.php?id=8 Do i copy and paste all of the code showed or just the last part and save it as a .search.php?
^^ Theres plenty of other mysql/php search function tutorials, that will teach you do to more advanced search functions. You should learn some basic php/mysql first though, it will make it so much easier for you.
I think that this resource might do the trick. http://www.thesitewizard.com/archive/searchengine.shtml