This is the code from my themes sidebar search:
<!-- // <label for="s"><?php _e('Search:'); ?></label> --> <br />
<form id="searchform" method="get" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<div>
<input type="text" name="s" id="s" size="15" /> <input type="submit" value="<?php _e('search'); ?>" />
</div>
</form>
<?php /* If this is a category archive */ if (is_category()) { ?>
<p class="cmeta">You are currently browsing the archives for the <?php single_cat_title(''); ?> category.</p>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<p class="cmeta">You are currently browsing the weblog archives
for the day <?php the_time('l, F jS, Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<p class="cmeta">You are currently browsing the weblog archives
for <?php the_time('F, Y'); ?>.</p>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<p class="cmeta">You are currently browsing the weblog archives
for the year <?php the_time('Y'); ?>.</p>
<?php /* If this is a monthly archive */ } elseif (is_search()) { ?>
<p class="cmeta">You have searched the weblog archives
for <strong>'<?php echo wp_specialchars($s); ?>'</strong>.</p>
<?php /* If this is a monthly archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<p class="cmeta">You are currently browsing the weblog archives.</p>
<?php } ?>