How can I pass proper querystring when Search from Drupal using my custom search box?
If you use the default search block for Drupal, it will give you the functionality you need.

EDIT: Go to Structure > Blocks and enable your Search Form Block by adding it to a region. 

If you perform a search using your default search block, it will redirect to a path in the format /search/node/QUERY where QUERY is what you are searching for.

By default the search form outputs (for example):

&lt;div class="block-wrapper"&gt;
    &lt;div class="block-container"&gt;
        &lt;div class="block"&gt;
            &lt;div class="content"&gt;
                &lt;form action="/" method="post" id="search-block-form" accept-charset="UTF-8"&gt;
                &lt;div&gt;
                    &lt;div class="container-inline"&gt;
                        &lt;h2 class="element-invisible"&gt;Search form&lt;/h2&gt;
                            &lt;div class="form-item form-type-textfield form-item-search-block-form"&gt;
                                &lt;label class="element-invisible" for="edit-search-block-form--2"&gt;Search&lt;/label&gt;
                                &lt;input title="Enter the terms you wish to search for." type="text" id="edit-search-block-form--2" name="search_block_form" value="" size="15" maxlength="128" class="form-text"&gt;
                            &lt;/div&gt;
                            &lt;div class="form-actions form-wrapper" id="edit-actions"&gt;
                                &lt;input type="submit" id="edit-submit" name="op" value="Search" class="form-submit"&gt;
                            &lt;/div&gt;
                            &lt;input type="hidden" name="form_build_id" value="form-4gEUIDHcVH7lHHH3JpkfkVs9xBmPhHXdDQAMFMF9dHA"&gt;
                            &lt;input type="hidden" name="form_token" value="afNo5gRQlaauXmqeZYDf80o5dEwKlg0VP6U-Ir8-p6k"&gt;
                            &lt;input type="hidden" name="form_id" value="search_block_form"&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/form&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


Now if I search for "test", it redirects to /search/node/test