开发者

how to code this? [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. Closed 11 years ago.

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜