What am I doing wrong with my search box?

Hi guys, I’ve been trying to design a simple search box on my site but it doesn’t seem to be working… (Please forgive me, I’m a noob at PHP :p)

Here is what I’m using:

<div class="search_div">
		<ul class="nav_ul">
				<li class="yelow_btn">
								<img src="http://www.mysite.com/wp-content/themes/images/yelow_left_btn.jpg">
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
        <input type="text" value="" name="s" id="s" />
        <input type="submit" value="" onclick="" class="search_btn">
<img src="http://www.mysite.com/wp-content/themes/images/yelow_right_btn.jpg">

Right now when I try using it it just takes me to http://www.mysite.com/<?s=searchterm - any advice? Thanks in advance!

Is this a Google search form? Your form’s only action is to call the home page, but unless that has some kind of script on it, nothing much can happen. Or is this part of a CMS?

I recommend you use a standard Google search form, which is super easy to set up.

Yep, I’m using wordpress - the correct page for that the search button should bring the user to would be http://www.mysite.com/?s=searchterm.

OK, I’ve moved this to the WP forum, as it’s really a question of how to use that CMS. :slight_smile: