I have designed this search box in photoshop and w开发者_Go百科ant to implement it into a static php file on my local machine. I want to be able to change from the different search engines, such as google, yahoo, and others by clicking on the logo to the left and a drop down list being displayed. I don't know how I would change the url that the form gets, but I think I would make a table for the drop down list. And I am not good at coding forms either... http://img824.imageshack.us/i/searchm.jpg/
Any help?
Looking at the 'dropdown' of search engines, I would imagine you'd have to use some kind of javascript framework for that (jQuery being my suggestion with this plugin):
http://www.marghoobsuleman.com/jquery-image-dropdown
http://jsfiddle.net/ddx4g/6/
Then you just need some PHP to work out what search engine was selected and the search title and redirect to the appropriate page:
$searchterm=$_POST['searchterm'];
$searchengine=$_POST['searchengine'];
echo'<META HTTP-EQUIV="Refresh" CONTENT="0; URL=$searchengine" . .com . "?=searchterm">'";
Or something along these lines. This was all done very quickly so there's bound to be some errors in here somewhere but should get you started.
精彩评论