Title: searchform.php hijacking comment.php?
Last modified: August 18, 2016

---

# searchform.php hijacking comment.php?

 *  [novice21](https://wordpress.org/support/users/novice21/)
 * (@novice21)
 * [18 years, 12 months ago](https://wordpress.org/support/topic/searchformphp-hijacking-commentphp/)
 * Everytime I try to add a comment to my post I end up with a ‘no search results
   found page.’
 * I know exactly whats causing the problem but I don’t know how to fix it! My problem
   comes from not having a search button in my searchform.. this is what searchform.
   php looks like:
 *     ```
       <form method="get" id="search_form" action="<?php bloginfo('home'); ?>" />
       	<input name="s" type="text" class="search_input" id="s" onfocus="if (this.value == 'search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'search';}" value="Search" />
       	<input type="hidden" id="searchsubmit" value="Search" />
       ```
   
 * Something in there ia conflicting with my comment.php because when I remove the
   code everything works fine and I can submit comments. My comment.php page is 
   untouched so it has the default code.
 * Any ideas?

Viewing 1 replies (of 1 total)

 *  Thread Starter [novice21](https://wordpress.org/support/users/novice21/)
 * (@novice21)
 * [18 years, 12 months ago](https://wordpress.org/support/topic/searchformphp-hijacking-commentphp/#post-573725)
 * I think I just fixed it… I changed my form code so that it still doesn’t have
   a button and yet comment.php works.
 *     ```
       <form method="get" id="searchform" action="<?php //bloginfo('home'); ?>/">
       <div><input type="text" value="<?php //the_search_query(); ?>" name="s" id="s" />
       <input type="hidden" id="searchsubmit" value="Search" />
       </div>
       </form>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘searchform.php hijacking comment.php?’ is closed to new replies.

## Tags

 * [form](https://wordpress.org/support/topic-tag/form/)

 * 1 reply
 * 1 participant
 * Last reply from: [novice21](https://wordpress.org/support/users/novice21/)
 * Last activity: [18 years, 12 months ago](https://wordpress.org/support/topic/searchformphp-hijacking-commentphp/#post-573725)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
